What are desired capabilities that we need to consider when invoking a firefox browser remotly via selenium

Viewed 303

I need to run the Firefox browser in a remote machine, using a Robot test case.

My environment : RHEL 6.9 Santiago, python:2.6.6, Rebot 2.9.1, selenium2library

firewall rule created to access the remote machine (x.x.x.x:4444/) so accessing remote endpoint is not a problem.

Successfully configured selenium grid is running in the Remote machine

Remote machine configuration details: Selenium server standalone 3.4.0, Firefox Browser Version:53.0.3(32bit)

This is my robot test case

*** Settings ***    
Library    SSHLibrary
Library    Selenium2Library


*** Keywords ***    
Start Browser
    [Arguments]    ${navigation}
    ${dict}    BuiltIn.Create Dictionary    seleniumProtocol=WebDriver    maxInstances=2    environment=firefox
    Open Browser    ${navigation}    firefox    None    http://192.168.1.1:4444/wd/hub    desired_capabilities=${dict}


*** Test Case ***
    Start Browser    http://www.google.com

When running the test case from my PC I'm getting the following error. Error message

19:50:36.131 INFO Opening browser 'firefox' to base url 'http://www.google.com' through remote server at 'http://x.x.x.X:YY/wd/hub'
19:50:36.131 WARN Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
19:50:36.131 INFO /usr/lib/python2.6/site-packages/selenium/ webdriver/remote/webdriver.py:97 :DeprecationWarning: Please use FirefoxOptions to set browser profile DeprecationWarning)
19:50:36.132 FAIL KeyError: 'desiredCapabilities'

What's wrong with this approach ? Any suggestions ?

0 Answers
Related