Unable to create remote sauce session with SeLion 2.0.0-SNAPSHOT
Closed this issue · 3 comments
SeLion Version
2.0.0-SNAPSHOT
Component
SeLion-appium-provider
Expected Behavior
Sauce session is successfully created.
Actual Behavior
Sauce session responded with error message:
Your test errored. Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","capabilities","sessionId","id"]} and you sent ["alwaysMatch","desiredCapabilities","requiredCapabilities","capabilities","firstMatch”]
Steps to Reproduce
I recently upgraded from SeLion 1.1.0 to 2.0.0 because I wanted to take advantage of the generic MobileElements.
We were running sauce tests using mobileNodeType = “appium”.
I added “SeLion-appium-provider” dependency but my session is not starting (note: abstracted sauce access key):
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=sauce-storage:PayPalQA.zip, appiumVersion=1.5.3, mobileNodeType=appium, language=en, locale=en_US, version=, deviceName=iPhone Simulator, acceptSslCerts=true, accessKey=*****, platformVersion=9.1, name=com.paypal.test.login.LoginTest, javascriptEnabled=true, platformName=iOS, seleniumVersion=3.3.1, unexpectedAlertBehaviour=ignore, username=LiveSanity, autoAcceptAlerts=true}], required capabilities = Capabilities [{}]
In the sauce session, I got error msg:
Your test errored. Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","capabilities","sessionId","id"]} and you sent ["alwaysMatch","desiredCapabilities","requiredCapabilities","capabilities","firstMatch”]
Looks like an incompatibility with java-client 4.1.2 and selenium 3.x.
Requesting a selenium 2.x node did not solve the session creation issue.
https://saucelabs.com/beta/tests/7c6346000d5c4f0da9ebda3ffe8aaa4d/metadata#0
The recommendation from the appium team (ref: appium/appium#8078) is to remove any selenium dependencies because the java-client will define which version to use:
https://github.com/appium/java-client/blob/4.1.2/pom.xml#L28 — which is 2.53.1 for the 4.1.2 java-client
Since SeLion is excluding the appium java-client to use selenium 3.3.1, I bumped up the java-client version instead.
In SeLion parent pom, changing appium.version to 5.0.0-BETA6 (compatible with 3.3.1, BETA8 will break because it requires 3.4.0) – the problem goes away.