我已经阅读了其他几个类似的主题问题,但问题仍未解决。在通过以下方式测试我的应用时,它恰好发生在特定输入字段中:
Keyboard keyboard = driver.getKeyboard();
element.click();
keyboard.sendKeys("text");
然后我得到以下日志:
org.openqa.selenium.WebDriverException:处理命令时发生未知的服务器端错误。 (警告:服务器未提供任何堆栈跟踪信息) 命令持续时间或超时:56毫秒 构建信息:版本:' 3.0.1',修订版:' 1969d75',时间:' 2016-10-18 09:49:13 -0700' 系统信息:主机:' XXXXXXXX',ip:' XXXXXXXXXXX',os.name:' Windows 8.1',os.arch:' amd64&# 39;,os.version:' 6.3',java.version:' 1.8.0_92' 驱动程序信息:io.appium.java_client.AppiumDriver 功能[{app = C:\ XXXXXXXXXXXX \ XXXXXX.apk,appPackage = com.ionicframework.XXXXXXXXXX,networkConnectionEnabled = true,warnings = {},appWaitPackage = com.ionicframework.XXXXXXX,appWaitActivity = com.ionicframework.XXXXXXX.MainActivity,app -package = com.ionicframework.XXXXXXXXXXXXXXX,app-activity = com.ionicframework.XXXXXXXXXXXXX.MainActivity,databaseEnabled = false,deviceName = XXXXXXXXXX,version = 5.1,platform = LINUX,deviceUDID = XXXXXXXX,appActivity = com.ionicframework.welcome762668.MainActivity ,desired = {app = C:\ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apk,browserName =,app-package = com.ionicframework.XXXXXXXXXX,app-activity = com.ionicframework.XXXXXXXXXXXXX.MainActivity,platformName = Android,deviceName = HUAWEI TIT-AL00 ,version = 5.1},platformVersion = 5.1,webStorageEnabled = false,locationContextEnabled = false,takesScreenshot = true,browserName =,javascriptEnabled = true,platformName = Android}] 会话ID:63186011-9ab0-443d-939e-7cc902ace5a4 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) 在org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) 在org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) 在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.PerformsTouchActions.performTouchAction(PerformsTouchActions.java:39) at io.appium.java_client.TouchAction.perform(TouchAction.java:322) at test.example.TestAppium.test(TestAppium.java:135) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:498)