Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.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
如何打开&;访问appium中的导航侧抽屉?我在appium中使用java语言实现自动化_Java_Android_Appium Android - Fatal编程技术网

如何打开&;访问appium中的导航侧抽屉?我在appium中使用java语言实现自动化

如何打开&;访问appium中的导航侧抽屉?我在appium中使用java语言实现自动化,java,android,appium-android,Java,Android,Appium Android,我的代码,但它不起作用: MobileElement el = (MobileElement) driver.findElementById("jpb.com.upisimulator:id/action_bar"); MobileElement el2 = el.findElementByName("Open navigation drawer"); el2.click(); 为此,您必须使用内容描述 driver.findElementByAccessibi

我的代码,但它不起作用:

MobileElement el = (MobileElement) driver.findElementById("jpb.com.upisimulator:id/action_bar");
        MobileElement el2 = el.findElementByName("Open navigation drawer");
        el2.click();

为此,您必须使用内容描述

driver.findElementByAccessibilityId("Open navigation drawer").click();

为此,您必须使用内容描述

driver.findElementByAccessibilityId("Open navigation drawer").click();