Exception in thread "main" org.openqa.selenium.WebDriverException:
Could not locate keyboard. (WARNING: The server did not provide any
stacktrace information) Command duration or timeout: 23.96 seconds
Build info: version: '2.53.0', revision: '35ae25b', time:
'2016-03-15 16:57:40' System info: host: 'QAs-iMac.local', ip:
'192.168.0.128', os.name: 'Mac OS X', os.arch: 'x86_64', os.version:
'10.11.4', java.version: '1.8.0_91' Driver info:
org.openqa.selenium.remote.RemoteWebDriver Capabilities
[{app=/Users/qa/Desktop/QA Team /pankaj/mac/Boku-1.ipa,
appPackage=com.boku, networkConnectionEnabled=false,
appWaitActivity=ui.activities.TutorialActivity,
databaseEnabled=false, deviceName=iPhone 6, fullReset=true,
platform=MAC, appActivity=ui.activities.SplashActivity,
showIOSLog=true, appium-version=1.5.1,
desired={app=/Users/qa/Desktop/QA Team /pankaj/mac/Boku-1.ipa,
appPackage=com.boku, appActivity=ui.activities.SplashActivity,
showIOSLog=true, appium-version=1.5.1, platformVersion=9.3.1,
appWaitActivity=ui.activities.TutorialActivity, platformName=iOS,
udid=a87a03d1680a6cfd142829db9b01da43019b278f, deviceName=iPhone 6,
fullReset=true}, platformVersion=9.3.1, webStorageEnabled=false,
locationContextEnabled=false, browserName=, takesScreenshot=true,
javascriptEnabled=true, platformName=iOS,
udid=a87a03d1680a6cfd142829db9b01da43019b278f}] Session ID:
89125084-e649-40f1-ba95-a738ba417521 at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327)
at
org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:122)
at Boku.Bokumain.main(Bokumain.java:188)
我正面临sendkeys()的这个问题。
答案 0 :(得分:0)
尝试通过这种方式隐藏keboard:
capabilities.setCapability("unicodekeyboard", true);
capabilities.setCapability("resetkeyboard", true);