0

使用不同的 iPhone 版本时会出现此问题。

使用 iPhone 5 和录音机:

app.scrollViews.otherElements.collectionViews.staticText[“TEXT”]

使用 iPhone 7 和录音机:

app.children(matching: .window).element(boundBy: 0).children(matching: .other).element(boundBy: 1).scrollViews.children(matching: .other).element.children(matching: .collectionView).element.children(matching: .cell).element(boundBy: 0).children(matching: .other).element(boundBy: 0)`

测试中断是因为在 iPhone 7 上进行测试时无法找到该元素,尽管在 iPhone 7 上使用 accessibilityInspector 会声明accessibilityValue 为“TEXT”

4

0 回答 0