无法在ipad应用中点按图像

时间:2013-06-03 11:35:28

标签: javascript ios ios-ui-automation xcode-instruments

我在应用中拥有此图片。我想模拟图像上的点击。图像位置如下:

target.frontMostApp().mainWindow().images()["patch blue right.png"].images()[4].

我的javascript代码如下:

target.frontMostApp().mainWindow().images()["patch blue right.png"].images()[4].tap();

但是在运行代码之后,会显示以下错误消息:

Error: target.frontMostApp().mainWindow().images()["patch blue right.png"].images()[4] could not be tapped .

我已检查过该图片是否有效。但图像不可见。 谁能告诉我,如果我不能点击有效但不可见的元素?

1 个答案:

答案 0 :(得分:0)

要回答你的问题,不,你不能点击不可见的元素。

similar question