-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
The problem
I am getting the following error when I use the 5.0.0-BETA6 java client while creating AndroidDriver instance.
[HTTP] --> POST /wd/hub/session {"capabilities":[{"desiredCapabilities":{"appPackage":"com.android.chrome","browserName":"Chrome","platformName":"Android","deviceName":"Android Emulator","platformVersion":"7.1.1"}},{"requiredCapabilities":{}}]} [debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","capabilities","sessionId","id"]} and you sent ["capabilities"]
Environment
Appium version (or git revision) that exhibits the issue: Appium version 1.6.4 and 5.0.0-BETA6 of the Java client
Last Appium version that did not exhibit the issue (if applicable): N/A
Desktop OS/version used to run Appium: Windows 10 Pro
Node.js version (unless using Appium.app|exe): Node v6.10.2
Mobile platform/version under test: Android 7.1.1
Real device or emulator/simulator: AndroidEmulator
Appium CLI or Appium.app|exe: appium
Details
I am getting a BadParametersError when using the 5.0.0-BETA6 version of the Java client while creating AndroidDriver.
Link to Appium logs
https://gist.github.com/sivasks19/ee11f3bcdc3d5c6611751f88d982bc48
Code To Reproduce Issue [ Good To Have ]
I am creating my Android Driver as below.
DesiredCapabilities androidCapabilities = new DesiredCapabilities();
androidCapabilities.setCapability("deviceName","Android Emulator");
androidCapabilities.setCapability("platformVersion","7.1.1");
androidCapabilities.setCapability("platformName","Android");
androidCapabilities.setCapability("browserName", "Chrome");
androidCapabilities.setCapability("appPackage", "com.android.chrome");
AndroidDriver<MobileElement> driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), androidCapabilities);