Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 单击ActionBar$选项卡上的操作_Java_Android_Appium Android - Fatal编程技术网

Java 单击ActionBar$选项卡上的操作

Java 单击ActionBar$选项卡上的操作,java,android,appium-android,Java,Android,Appium Android,我正在使用appium为android编写测试脚本。 我如何在ActionBar$Tab元素上执行单击操作?我是否可以使用转义字符传递带有$的xpath?我如何让appium单击Tab元素?使用xpath,其中包含文本。实际上是Actionbar.tab类,它被转换为Actionbar$tab,在脚本中使用时失败。尝试将xpath与android textview一起使用,它在层次结构中的位置类似(“(//android.widget.textview.instance(3)”)。或者使用dri

我正在使用appium为android编写测试脚本。
我如何在ActionBar$Tab元素上执行单击操作?我是否可以使用转义字符传递带有$的xpath?我如何让appium单击Tab元素?

使用xpath,其中包含文本。实际上是Actionbar.tab类,它被转换为Actionbar$tab,在脚本中使用时失败。尝试将xpath与android textview一起使用,它在层次结构中的位置类似(“(//android.widget.textview.instance(3)”)。或者使用driver.findelementbyAndroidUiautomator(“text(\“sample\”))