Appium 无法识别IOS中的元素

Appium 无法识别IOS中的元素,appium,appium-ios,Appium,Appium Ios,我一直在尝试使用Appium从IOS中单击附加的突出显示(红色箭头)图标,但一直出现超时异常。仅需要对表中的“193930副本1”记录进行此单击。有什么帮助吗 Appium: 1.6.2 XCode: 9.4 Tested in?: Native App IOS: 11.4 Model: iPhone X 例外情况:- org.openqa.selenium.TimeoutException:预期条件失败:正在等待by.xpath定位的元素的可见性: 试用的XPath有:- //XCUIEle

我一直在尝试使用Appium从IOS中单击附加的突出显示(红色箭头)图标,但一直出现超时异常。仅需要对表中的“193930副本1”记录进行此单击。有什么帮助吗

Appium: 1.6.2
XCode: 9.4
Tested in?: Native App
IOS: 11.4
Model: iPhone X
例外情况:-

org.openqa.selenium.TimeoutException:预期条件失败:正在等待by.xpath定位的元素的可见性:

试用的XPath有:-

//XCUIElementTypeStaticText[@name='193930 Copy 1']/XCUIElementTypeButton[contains(@name, 'more')]

(//XCUIElementTypeStaticText[@name='193930 Copy 1'])/following-sibling::XCUIElementTypeButton[@name='more']

//XCUIElementTypeStaticText[@name='193930 Copy 1']/XCUIElementTypeButton[`name == "more"']

//XCUIElementTypeStaticText[contains(@name,'193930 Copy 1')]/following-sibling::XCUIElementTypeButton
//XUIElementTypeStaticText[包含(@name,'193930 Copy 1')]/XUIElementTypeButton


我尝试在我们自己的应用程序中复制您遇到的问题,这就是我想到的,它对我有效(请注意,我使用的是Appium版本1.7.1,这可能会影响结果):


您不需要指定下一个元素的名称,因为您可以使用应用程序的结构。我认为你尝试的错误之处在于你把错误的属性组合在一起

页面上是否有多个“更多”-按钮?是的,表包含记录列表,并且“更多”按钮与每条记录关联。我认为您最后的定位器最正确。将xpath添加到本文中的标记列表中,以便对xpath有更多经验的人可以发表评论,并可能提供更好的解决方案。我会为你做的,但这需要同行的批准,如果你像最初的海报那样做,它会通过的。
//XCUIElementTypeStaticText[@name='193930 Copy 1']/following-sibling::XCUIElementTypeButton