appium 1.3.4
部分脚本:
capabilities.setCapability("autoAcceptAlerts", true);
capabilities.setCapability("resetKeyboard", true);
capabilities.setCapability("unicodeKeyboard", true);
capabilities.setCapability("full-reset", true);
driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
报错脚本 1:
MobileElement mobileNumber = (MobileElement) driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextField[1]"));
mobileNumber.sendKeys("13818181818");
报错脚本 2:
MobileElement sms_verify1 = (MobileElement) driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextField[1]"));
sms_verify1.sendKeys("8");
MobileElement sms_verify2 = (MobileElement) driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextField[2]"));
sms_verify2.sendKeys("8");
MobileElement sms_verify3 = (MobileElement) driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextField[3]"));
sms_verify3.sendKeys("8");
MobileElement sms_verify4 = (MobileElement) driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATextField[4]"));
sms_verify4.sendKeys("8");
报错内容:
Exception in thread "main" org.openqa.selenium.WebDriverException: An error occurred while executing user supplied JavaScript. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.34 seconds
问题描述:
在尝试想 text 组件中输入内容时,会间歇性的发生错误,虽然配置了 resetKeyBoard,但是观察到键盘总会有不弹出的现象,导致用 sendKeys 失败报错,但有时又可以正常运行。使用 setValue 虽然不报错,但 app 会不继续执行。想请问一下是否有其他解决方案。