【发布时间】:2016-03-19 08:52:45
【问题描述】:
有人可以帮助找到正确的 xpath 吗?
我需要捕获国家代码,因为我需要识别元素。我尝试遵循 xpath,但没有运气。
索引 1 处的线性布局
//[@class='android.widget.LinearLayout' 和 @index=1]/.//[@resource-id='com.whatsapp:id/country_code' 和 @索引=1]
//[@class='android.widget.LinearLayout' 和 @index=1]/..//[@resource-id='com.whatsapp:id/country_code' 和@index=1]
//[@class='android.widget.LinearLayout' 和 @index=1]/../[@resource-id='com.whatsapp:id/country_code' 和 @索引=1]
【问题讨论】:
标签: xml xpath selenium-webdriver