'Robot Framework + Sauce labs can't recognize the Browser Edge name

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


Solution 1:[1]

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.

Solution 2:[2]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 titusfortner
Solution 2 Helio