You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
相关日志:uiautomator2.exceptions.XPathElementNotFoundError: ["//*[@text='(//android.widget.ImageView)[2]' or @content-desc='(//android.widget.ImageView)[2]' or @resource-id='(//android.widget.ImageView)[2]']"]
使用括号开头的xpath
(//android.widget.ImageView)[2]
用来匹配第n个match的元素时会被当作自定义的字符串匹配语法处理
uiautomator2.exceptions.XPathElementNotFoundError: ["//*[@text='(//android.widget.ImageView)[2]' or @content-desc='(//android.widget.ImageView)[2]' or @resource-id='(//android.widget.ImageView)[2]']"]
d.xpath("(//android.widget.ImageView)[2]").get(1)
The text was updated successfully, but these errors were encountered: