Search code examples
selenium-webdriverselenium-grid

Selenium Grid Specifications


I have been researching WebDriver's JSON Wire Protocol but this does not seem to include how to interact with the grid i.e. POST /wd/hub/register etc. Do you know where I can find the specifications of Selenium Grid?


Solution

  • Using the information found in the Selendroid Wiki and using a handy-dandy debugger I managed to figure out how it works, so here goes:

    • Download the Standalone-Server jar and start it from terminal using the following command

      java -jar selenium-server-standalone-2.45.0.jar -role hub

    • Start your WebDriver implementation

    • Prepare a file with the configuration as described in the Selendroid Wiki page and changing ports and urls according to your configuration

    • Send a register request to the hub using the following terminal command:

      curl -H "Content-Type: application/json" -X POST --data @node-config.json http://localhost:4444/grid/register

    • Use the Selenium grid as you wish