3

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 ?

Rifazy
  • 31
  • 5
  • 1
    Tried your code on a locally running Selenium Hub and Node, and this worked for me. So, I'm suspecting your link with your own Hub. Have you checked their console logs for information? I.e. if it connected to the Hub it would log this to the hub console: "Got a request to create a new session". In the Node it would show: "Creating a new session for Capabilities". Please check those. – A. Kootstra May 26 '17 at 20:25

0 Answers0