org.openqa.selenium.WebDriverException方法未实现

时间:2019-03-05 09:12:33

标签: selenium-webdriver appium-android

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "9c37fa48");
capabilities.setCapability("browserName", "Android");
capabilities.setCapability("platformVersion", "8");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("appPackage", "com.xxx.yyy");
capabilities.setCapability("appActivity", "com.xxx.yyy.MainActivity");
capabilities.setCapability("appWaitActivity", "com.xxx.yyy.MainActivity");
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

我看到的是代码尝试访问该应用程序。此后,我得到以下异常。


Mar 05, 2019 3:37:23 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Mar 05, 2019 3:37:34 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '405' -> incorrect JSON status mapping for 'unknown error' (500 expected)
FAILED: setUp
org.openqa.selenium.WebDriverException: Method is not implemented
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'M710S-MDT06', ip: '192.168.7.148', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {appActivity: com.wizlearn.tmlearn.MainAc..., appPackage: com.wizlearn.tmlearn, appWaitActivity: com.wizlearn.tmlearn.MainAc..., databaseEnabled: false, desired: {appActivity: com.wizlearn.tmlearn.MainAc..., appPackage: com.wizlearn.tmlearn, appWaitActivity: com.wizlearn.tmlearn.MainAc..., deviceName: 9c37fa48, platformName: android, platformVersion: 8}, deviceManufacturer: samsung, deviceModel: SM-T825Y, deviceName: 9c37fa48, deviceScreenSize: 1536x2048, deviceUDID: 9c37fa48, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, platform: LINUX, platformName: LINUX, platformVersion: 8.0.0, takesScree`enter code here`nshot: true, warnings: {}, webStorageEnabled: false}
Session ID: 8a08634e-3e25-4f30-a114-8b315070fc57
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

Appium桌面版本:1.11.0

java版本“ 1.8.0_201”

硒3.141.59

1 个答案:

答案 0 :(得分:0)

我以前使用Windows 8.1的Selenium远程Web驱动程序

对于Widnows 10,已更改为Anroid驱动程序。

WebDriver驱动程序=新的AndroidDriver <>(新的URL(“ http://127.0.0.1:4723/wd/hub”),功能);

现在可以了!