# Not able to use desired\_capabilities

**URL:** <https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349>\
**Category:** SeleniumLibrary\
**Created:** [12 October 2023 11:39 UTC](https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349 "2023-10-12T11:39:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siyashree](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Siyashree](https://forum.robotframework.org/u/Siyashree)\
**Post date:** [12 October 2023 11:39 UTC](https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349/1 "2023-10-12T11:39:04Z")

</div>

Hi there,  
I have windows 11 and selenium 4.4.3 on my PC  
and was trying to use sauce labs to execute automation tests on safari with this keyword

Open Browser ${URL} ${Browser} remote\_url= desired\_capabilities=name:MacOS Test,platform:macOS 13, browserName:Safari,version:15

however I’m getting following error:  
desired\_capabilities has been deprecated and removed. Please use options to configure browsers as per documentation.

not able to understand the usage of “options” through documentation. can someone point me towards a working example in robot script?

---

<div class="post-metadata">

**Author:** ![EdManlove](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/edmanlove/32/1002_2.png) [@EdManlove](https://forum.robotframework.org/u/EdManlove)\
**Post date:** [12 October 2023 12:20 UTC](https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349/2 "2023-10-12T12:20:12Z")

</div>

Here is an example with the browser version

```python
***Settings***
Library SeleniumLibrary

***Test Cases***
Check Using Chrome Version 114
    Open Browser ${None} Chrome options=browser_version("114")

```

Options can be a bit tricky as there is both options which have values - like broswer\_version which has a value of “114” and then arguments which have both an argument name and value but come into the options as shown in the `Open Browser` keyword doc. For example,

```python
Open Browser	None	Chrome	options=binary_location="/path/to/binary";add_argument("remote-debugging-port=port")

```

which has an argument `remote-debugging-port` with a value of `port.` Here too is an option of `binary_location`. This may be clear to some but I will admit I get confused in here sometimes myself.

Some resources

[Sauce Labs Configuration Documentation](https://docs.saucelabs.com/dev/test-configuration-options/)  
And linked through the Sauce Labs is the [Selenium Doc for Options](https://www.selenium.dev/documentation/webdriver/browsers/chrome/).

---

<div class="post-metadata">

**Author:** ![EdManlove](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/edmanlove/32/1002_2.png) [@EdManlove](https://forum.robotframework.org/u/EdManlove)\
**Post date:** [12 October 2023 12:30 UTC](https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349/3 "2023-10-12T12:30:30Z")

</div>

[Bit busy this morning so trying to find some more resources and real examples … but wanted to let you know I might not get to these till later…]

Another resource is Josh Grant’s [2022 RoboCon Talk on using cloud providers](https://www.youtube.com/watch?v=MNL59uHnwN8). Josh was a Sauce Labs Engineer. I don’t recall what is here in the video but it may be helpful.

Beyond the browser version above from your script I believe the “desired” operating systems values might be some sort of Sauce Labs specific options which I don’t know where those go. Searching their doc might turn up those.

Finally there was an issue with SeleniumLibrary 6.1.2 which as I re-read it shouldn’t affect you. (It is if option is blank for remote url). But just in case [there is a beta release](https://pypi.org/project/robotframework-seleniumlibrary/6.1.3b1/) which I need to make the formal release to later today if possible.

---

<div class="post-metadata">

**Author:** ![Siyashree](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Siyashree](https://forum.robotframework.org/u/Siyashree)\
**Post date:** [12 October 2023 12:37 UTC](https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349/4 "2023-10-12T12:37:58Z")

</div>

thanks EdManlove! will check these out. lets see if these get me a solution 🙂

---

<div class="post-metadata">

**Author:** ![EdManlove](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/edmanlove/32/1002_2.png) [@EdManlove](https://forum.robotframework.org/u/EdManlove)\
**Post date:** [12 October 2023 12:48 UTC](https://forum.robotframework.org/t/not-able-to-use-desired-capabilities/6349/5 "2023-10-12T12:48:18Z")

</div>

Did scroll down on the [Sauce Labs Doc to see platformName](https://docs.saucelabs.com/dev/test-configuration-options/#platformname) is actually part of the w3c spec as an option. So not Sauce Labs specific. As with browserVersion, the python implementation uses `platform_name` which differs than the w3c spec name platformName. One last resource which I should have given is the Selenium Python API docs and in particular the two sections on

[Common options used by all browsers](https://www.selenium.dev/selenium/docs/api/py/webdriver/selenium.webdriver.common.options.html#module-selenium.webdriver.common.options)

and then [the Chrome options](https://www.selenium.dev/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#module-selenium.webdriver.chrome.options)

[Here is the link to [the main page for the Python API](https://www.selenium.dev/selenium/docs/api/py/api.html) which one can find, amongst other things, the rest of the browser specific options.]
