mardi 2 avril 2019

why appium v1.12.1 give this error when i execute test scripts?

error information: [debug] [MJSONWP] Encountered internal error running command: Error: Could not find a driver for automationName 'Appium' and platformName 'Android'. Please check your desired capabilities. it seems there is something wrong about capabilities.but i think it is not wrong in my code. I can run the scripts without any errors using Appium v1.9.1 why Appium vv1.12.1 will encounter this problem?

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(MobileCapabilityType.UDID, cf.readConf2("uuid"));
caps.setCapability(MobileCapabilityType.DEVICE_NAME, cf.readConf2("uuid"));
caps.setCapability("automationName", "Appium");
caps.setCapability("platformName", "Android");
caps.setCapability("browserName", "Chrome");
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"), caps);

Detail error info:
C:\Users\v.ll>appium
[Appium] Welcome to Appium v1.12.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"desiredCapabilities":"automationName":"Appium","browserName":"
Chrome","udid":"8DF6R16826005016","platformName":"Android","deviceName":"8DF6R16826005016"},"requiredCapabilities":{}},"desiredCapabilities":{"automationName":"Appium","browserName":"Chrome","udid":"8DF6R16826005016","platformName":"Android","deviceName":"8DF6R16826005016"},"requiredCapabilities":{}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"automationName":"Appium","browserName":"Chrome","udid":"8DF6R16826005016","platformName":"Android","deviceName":"8DF6R16826005016"},{},{"desiredCapabilities":{"automationName":"Appium","browserName":
"Chrome","udid":"8DF6R16826005016","platformName":"Android","deviceName":"8DF6R16826005016"},"requiredCapabilities":{}}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1554171606385 (10:20:06 GMT+0800 (GMT+08:00))
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1554171606411 (10:20:06 GMT+0800 (GMT+08:00))
[debug] [MJSONWP] Encountered internal error running command: Error: Could not find a driver for automationName 'Appium' and platformName 'Android'. Please check your desired capabilities.
[debug] [MJSONWP]     at AppiumDriver.getDriverAndVersionForCaps (C:\Users\v.ll
\AppData\Roaming\npm\node_modules\appium\lib\appium.js:205:11)
[debug] [MJSONWP]     at AppiumDriver.getDriverAndVersionForCaps [as createSession] (C:\

Aucun commentaire:

Enregistrer un commentaire