找不到可见的元素

时间:2019-01-30 11:56:54

标签: ios testing appium

系统特征:

** iPhone 6s iOS 10.2 Appium桌面1.10.0 Xcode 10.1 MacOS High Sierra 10.13.6

iPhone 7 iOS 12.2 Appium桌面1.10.0 Xcode 10.1 MacOS High Sierra 10.13.6 **

在被测应用程序的特定部分,我试图找到所有可见的“ XCUIElementTypeStaticText”,但仅返回了一个元素(在底部的图片中)。

当我尝试通过 iPhone 6s 运行以下查询时:

  • 谓词iOS:类型=='XCUIElementTypeStaticText',可见== 1

screenshot at jan 30 11-53-31

screenshot at jan 30 11-55-58

  • 类链:** / XCUIElementTypeStaticText [visible == 1]

screenshot at jan 30 11-57-53

screenshot at jan 30 11-58-14

  • Xpath:// XCUIElementTypeStaticText [@visible ='true']

screenshot at jan 30 11-59-03

screenshot at jan 30 12-00-45

如您所见,对于Xpath,检索到的元素是正确的。

当我尝试通过 iPhone 7 运行以下查询时:

  • 谓词iOS:类型=='XCUIElementTypeStaticText',可见== 1

screenshot at jan 30 12-23-25

screenshot at jan 30 12-23-45

  • 类链:** / XCUIElementTypeStaticText [visible == 1]

screenshot at jan 30 12-24-53

screenshot at jan 30 12-25-07

  • Xpath:// XCUIElementTypeStaticText [@visible ='true']

screenshot at jan 30 12-36-19

screenshot at jan 30 12-29-12

此外,正如您在底部的图片中所看到的那样,该应用程序的元素尽管可见,但它们已在iPhone 7上将visible属性设置为false,而在iPhone6上,visible属性为true。

screenshot at jan 30 11-43-27

最后,在捕获屏幕快照和页面源代码时,查找动作也非常慢。

这是指向日志文件的链接,其中包含描述的所有操作:appium.log

0 个答案:

没有答案
相关问题