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