我有一个收藏品里面有投资的。以图像形式出现的物体。所以问题是贴在这些元素上。我无法从此窗口中选择元素,辅助功能检查器将带有元素的整个窗口显示为缺少可访问性值的按钮。
无障碍检查员形象
所以,如果我使用的只是记录按钮,那么我将得到这段代码,但它无法播放。我仍然没有标签和索引。
XCUIApplication().childrenMatchingType(.Window).elementBoundByIndex(0).childrenMatchingType(.Other).element.childrenMatchingType(.Other).element.childrenMatchingType(.Other).element.childrenMatchingType(.Other).element.childrenMatchingType(.Other).element.childrenMatchingType(.Other).element.childrenMatchingType(.Button).element.tap()
有人知道如何解决这个问题吗?
发布于 2016-02-04 12:47:47
尝试以以下方式访问控制(最好使用po以渐进的方式调试和检查每个元素的值)
[XCUIApplication.buttons elementBoundbyIndex:0]或者[[[XCUIApplication.windows elementBoundbyIndex:0] buttons] elementBoundbyIndex:0] ..。等等。
https://stackoverflow.com/questions/34341265
复制相似问题