vividus-framework / vividus

VIVIDUS is all in one test automation tool
https://docs.vividus.dev
Apache License 2.0
376 stars 85 forks source link

SmartBear CrossBrowserTesting tool: capabilities are not passed correctly in VIVIDUS 0.4.0 #2423

Closed cherevachy closed 2 years ago

cherevachy commented 2 years ago

Describe the bug In VIVIDUS 0.4.0 the following error message is displayed for CBT executions: Could not start a new session. Unable to parse remote response: Capabilities must specify either a browserName or browser_api_name so we know what browser to launch.

To Reproduce Run any story with the following capabilities set: selenium.grid.enabled=true selenium.grid.username=$username selenium.grid.password=$password selenium.grid.host=hub.crossbrowsertesting.com selenium.grid.url=http://($username):($password)@${selenium.grid.host}:80/wd/hub selenium.grid.capabilities.name=Selenium Test selenium.grid.capabilities.browserName=CHROME selenium.grid.capabilities.version=latest selenium.grid.capabilities.platformName=Android selenium.grid.capabilities.platformVersion=9.0 selenium.grid.capabilities.deviceName=Galaxy Tab S5E selenium.grid.capabilities.device-orientation=portrait selenium.grid.capabilities.screen-resolution=1600x2560

Actual: json is generated successfully: { "browserName" : "CHROME", "device-orientation" : "portrait", "deviceName" : "Galaxy Tab S5E", "goog:chromeOptions" : { "args" : [ ], "extensions" : [ ] }, "name" : "Selenium Test", "platformName" : "Android", "platformVersion" : "9.0", "screen-resolution" : "1600x2560", "version" : "latest" }

At the same time the error message is displayed and the test script cannot be started

valfirst commented 2 years ago

SmartBear CrossBrowserTesting uses legacy JWP, but Appium forces to use W3C protocol. The workaround is implemented, here is an example how to run tests on iOS platform:

./gradlew runStories -Pvividus.configuration.profiles=crossbrowsertesting/web,web/phone/iphone \
                     -Pvividus.selenium.grid.username=_username_ \
                     -Pvividus.selenium.grid.password=_key_ \
                     -Pvividus.selenium.grid.capabilities.cbt\:options.deviceName="iPhone 12 Pro Max"