Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/206.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/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
无法使用Appium在Android中选择日期选择器_Android_Xpath_Automation_Appium_Mobile Application - Fatal编程技术网

无法使用Appium在Android中选择日期选择器

无法使用Appium在Android中选择日期选择器,android,xpath,automation,appium,mobile-application,Android,Xpath,Automation,Appium,Mobile Application,问题 我无法使用appium在android设备中选择日期选择器。 我尝试了三种方法,但仍然无法改变。 请建议我如何进行这项工作 详细信息 我已经尝试使用Xpath,检查器正在检查元素,但它没有改变我通过.sendkeys提供的值。 因此,如果有任何建议,请将其传递给我,以便帮助我向前迈进 试试看 试试看 试试看 面对同样的问题:(面对同样的问题:( ((AndroidElement)(driver.findElementByXPath("//android.widget.NumberPicke

问题 我无法使用appium在android设备中选择日期选择器。 我尝试了三种方法,但仍然无法改变。 请建议我如何进行这项工作

详细信息 我已经尝试使用Xpath,检查器正在检查元素,但它没有改变我通过.sendkeys提供的值。 因此,如果有任何建议,请将其传递给我,以便帮助我向前迈进

试试看

试试看

试试看


面对同样的问题:(面对同样的问题:(
((AndroidElement)(driver.findElementByXPath("//android.widget.NumberPicker[@index='0']//android.widget.Button[@index=0]"))).tap(1, 2);
((AndroidElement)(driver.findElementByXPath("//android.widget.NumberPicker[@index='1']//android.widget.Button[@index=0]"))).tap(1, 2);
((AndroidElement)(driver.findElementByXPath("//android.widget.NumberPicker[@index='2']//android.widget.Button[@index=0]"))).tap(1, 2);
List pick = driver.findElements(By.className("android.widget.EditText"));
pick.get(0).sendKeys("24");;
pick.get(1).sendKeys("5");
pick.get(2).sendKeys("1991");
driver.findElement(By.xpath("//android.widget.NumberPicker[@index='0']")).sendKeys("5");
driver.findElement(By.xpath("//android.widget.NumberPicker[@index='1']")).sendKeys("5");
driver.findElement(By.xpath("//android.widget.NumberPicker[@index='2']")).sendKeys("1990")