C# 如何通过Xpath按元素
我希望通过以下层次结构单击元素(在Appium中,使用Selenium):C# 如何通过Xpath按元素,c#,android,selenium,xpath,appium,C#,Android,Selenium,Xpath,Appium,我希望通过以下层次结构单击元素(在Appium中,使用Selenium): (1)LinerLayout-->android.widget.LinearLayout (0)RelativeLayout-->android.widget.RelativeLayout (0)ImageView-->android.widget.ImageView如注释中所述为了解决此问题,X路径不得包含单个倒逗号,除非与包含或任何其他字符串操作一起使用- 按以下方式更改x路径应有效- "//android.wid
(1)LinerLayout-->android.widget.LinearLayout
(0)RelativeLayout-->android.widget.RelativeLayout
(0)ImageView-->android.widget.ImageView
如注释中所述为了解决此问题,X路径
不得包含单个倒逗号,除非与包含
或任何其他字符串操作一起使用-
按以下方式更改x路径应有效-
"//android.widget.LinearLayout[1]/android.widget.RelativeLayout[0]/android.widget.ImageView[0]"
尝试删除单个倒逗号-
“//android.widget.LinearLayout[1]/android.widget.RelativeLayout[0]/android.widget.ImageView[0]”
perfect。不幸的是,我无法将其标记为已回答