java - How to feed appium with right parameters? -
i'm trying connect android emulator following capabilities:
public class simpleandroidcalctest { webdriver driver; @before public void setup() throws malformedurlexception { desiredcapabilities capabilities = new desiredcapabilities(); capabilities.setcapability("platformname", "android"); capabilities.setcapability("platformversion", "7.1.1"); capabilities.setcapability("devicename", "android-7"); capabilities.setcapability("apppackage", "com.android.calculator2"); capabilities.setcapability("appactivity", "com.android.calculator2.calculator"); driver = new remotewebdriver(new url("http://127.0.0.1:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlywait(15, timeunit.seconds); }
and keep getting following bad parameters error:
[http] --> post /wd/hub/session {"desiredcapabilities":{"apppackage":"com.android.calculator2","appactivity":"com.android.calculator2.calculator","platformversion":"7.1.1","platformname":"android","devicename":"android-7"},"requiredcapabilities":{},"capabilities":{"desiredcapabilities":{"apppackage":"com.android.calculator2","appactivity":"com.android.calculator2.calculator","platformversion":"7.1.1","platformname":"android","devicename":"android-7"},"requiredcapabilities":{}},"alwaysmatch":{"apppackage":"com.android.calculator2","appactivity":"com.android.calculator2.calculator","platformversion":"7.1.1","platformname":"android","devicename":"android-7"},"firstmatch":[]} [mjsonwp] bad parameters: badparameterserror: parameters incorrect. wanted {"required":["desiredcapabilities"],"optional":["requiredcapabilities","capabilities","sessionid","id"]} , sent ["desiredcapabilities","requiredcapabilities","capabilities","alwaysmatch","firstmatch"] [http] <-- post /wd/hub/session 400 4 ms - 243
i've checked many times input capabilities, seem valid, far can tell, or should use else?
appium server: v1.6.4 selenium-java: v3.3.1
this error happens because using selenium-java : v3.3.1 without correct appium java client
please refer : https://github.com/appium/java-client
only latest appium java client 5.0.0-beta7 possible use selenium-java : v3.3.1.
or can revert selenium-java 2.53.1
Comments
Post a Comment