2
votes

first time posting here so forgive me if I am missing any details.

I am using the following setup:
robot framework: 3.0.1 (Python 2.7.10)
selenium: 3.4.1
selenium2library: 1.4.1

I have one mac machine configured as the grid hub and another as the node.

Here is my RF test:

Open Browser    url=http://www.google.com    browser=firefox    remote_url=http://hub-server:4444/wd/hub    desired_capabilities=browser:firefox
Maximize Browser Window

I am just trying to open the browser on the other machine for right now to get it working but I get the below error when trying to execute the script:

KeyError: 'desiredCapabilities'

When I change my test to:

Open Browser    url=http://www.google.com    browser=firefox    remote_url=http://hub-server:4444/wd/hub    desiredCapabilities=browser:firefox
Maximize Browser Window

I get this error:

Keyword 'Selenium2Library.Open Browser' got positional argument after named arguments.

I googled around and found https://github.com/SeleniumHQ/selenium/issues/3808 but I am not sure if this is related to my issue. Any help is much appreciated. Thanks!

1

1 Answers

0
votes

According to the documentation, the keyword is desired_capabilities, not desiredCapabilities

If you specify a value for remote you can also specify 'desired_capabilities' which is a string in the form key1:val1,key2:val2 that will be used to specify desired_capabilities to the remote server. This is useful for doing things like specify a proxy server for internet explorer or for specify browser and os if your using saucelabs.com. 'desired_capabilities' can also be a dictonary (created with 'Create Dictionary') to allow for more complex configurations.