Reputation: 51
i am running my robot framework test in Sauce labs, for chrome/firefox/safari, it is all right. but for Edge, Sauce labs can't recognize the Edge browser name.
I try to use "edge", it complain. "Misconfigured -- Unsupported OS/browser/version/device combo: OS: 'Windows 10', Browser: 'edge', Version: '97.', Device: 'unspecified' "
I try to use "MicrosoftEdge", it complains "ValueError: microsoftedge is not a supported browser."
what is the correct Edge name for Robot framework+sauce lab? my test case like the followings, Any suggestion is welcomed. Thanks.
test
&{SAUCE_OPTIONS} Create Dictionary extendedDebugging=${True}
... capturePerformance=${True}
... seleniumVersion=4.0.0
... name=RF_Test
... build='demo'
&{DESIRED_CAPABILITIES} Create Dictionary
... browserName=MicrosoftEdge
... platform=Windows 10
... browserVersion=latest
... sauce:options=&{SAUCE_OPTIONS}
${remote_url} Set Variable https://sauceUserName:[email protected]:443/wd/hub
Open Browser https://google.com
... browser=${DESIRED_CAPABILITIES['browserName']}
... remote_url=${remote_url}
... desired_capabilities=${desired_capabilities}
# ... options=${options}
Sleep 5s
Close Browser
Upvotes: 0
Views: 794
Reputation: 1
As browserName in desired capabilities use 'MicrosoftEdge' But with 'Open Browser' keyword you should use 'edge' as browser This solution works for me
Upvotes: 0
Reputation: 51
I am not sure this is the Robot Framework issue or the Sauce labs issue. but I can do some trick to make the Edge work with RF+Sauce labs. the problem is happening at browser parameter in the Keyword Open Browser. if just keep this browser as default firefox, and specify "MicrosoftEdge" in the desired capabilities for sauce labs. the test will run as expected. The only bad thing for this trick is when you read RF log file, it said "Opening browser 'firefox' to base url 'https://XX.com' through remote server at..., Actually, it is opening Edge browser.
test
&{SAUCE_OPTIONS} Create Dictionary
... name=RF_Test
... build='demo'
&{DESIRED_CAPABILITIES} Create Dictionary
... browserName=MicrosoftEdge
... platform=Windows 10
... browserVersion=latest
... sauce:options=&{SAUCE_OPTIONS}
${remote_url} Set Variable https://sauceUserName:[email protected]:443/wd/hub
Open Browser https://google.com
***#... browser=${DESIRED_CAPABILITIES['browserName']}#get rid of this parameter#***
... remote_url=${remote_url}
... desired_capabilities=${desired_capabilities}
Sleep 5s
Close Browser
Upvotes: 1
Reputation: 4194
It isn't well documented, and when used locally, it will work with several values, but the one it identifies itself as is msedge
2022-02-21 12:44:53 INFO Selenium >>> http://127.0.0.1:9515/session | {"capabilities":{"alwaysMatch":{"browserName":"MicrosoftEdge","unhandledPromptBehavior":"ignore","ms:edgeOptions":{}}}}
2022-02-21 12:45:00 INFO Selenium <- {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"msedge","browserVersion":"98.0.1108.51","ms:edgeOptions":{"debuggerAddress":"localhost:52338"},"msedge":{"msedgedriverVersion":"98.0.1108.56 (9a336a18eae89157b3c7ea0568a9cbced8ebc3f7)","userDataDir":"/var/folders/fx/nlx77ccs72g808pr1994_xtw0000gn/T/.com.microsoft.edgemac.5dBA6q"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"mac os x","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"ignore","webauthn:extension:credBlob":true,"webauthn:extension:largeBlob":true,"webauthn:virtualAuthenticators":true},"sessionId":"103b9fc98e46a159a3d91effe98e5d33"}}
For Sauce Labs, though, please use the platform configurator to see exactly what you should be sending to Sauce Labs — https://saucelabs.com/platform/platform-configurator
The code is updated to use Selenium libraries not Robot, so if you are creating it from scratch, you can see what is expected from the node.js + w3c tabs.
Your specific code is not working because you need to use platformName
instead of platform
.
Upvotes: 1
Reputation: 3737
I would go for Edge, you did not mention if you tried that one.
Documentation is not clear about examples for browserName. Also reading WebDriver W3C Specification does give an answer.
Upvotes: 0