Setup remote selenium driver

Do you want your Jenk­ins plan to run your func­tional automa­tion tests to run against remote sele­nium host? Do you need help in set­ting up remote sele­nium host? Then this tuto­r­ial will teach you step by step how to setup remote sele­nium host.

  1. Down­load and install Google chrome
  2. Down­load and install JDK. If you already have it installed then you can skip this step.
  3. Down­load selenium-server-standalone jarfile
    • From here
    • If you want a par­tic­u­lar ver­sion of the server then mod­ify the path para­me­ter in the above URL
  4. Down­load chromedriver.exe. And add it to the PATH envi­ron­ment variable.
    • From here. An alter­na­tive way to down­load is the following :
$ sudo apt-get install unzip
$ cd $HOME/Downloads
$ wget
$ sudo unzip
$ mkdir -p $HOME/bin
$ mv chromedriver $HOME/bin
$ echo "export PATH=$PATH:$HOME/bin" >> $HOME/.bash_profile 

This file will needs to be in a direc­tory in your PATH envi­ron­ment vari­able, so that it can be found by selenium.

Con­grat­u­la­tions !!! You are all set !!!

  1. Run the sele­nium server
    • Nav­i­gate to the direc­tory that your selenium-server-standalone jarfile is located in.
    • java -jar selenium-server-standalone-2.44.0.jar
  2. The remote host is set up, with the sele­nium jarfile running
    • Point your func­tional tests to run against this remote host using remote hosts IP address. Most likely you have to set the fol­low­ing flag --seleniumHost=ip_address_remote_host

You may also like...

  • Har­shal Sarode

    how to test sele­nium chrome inte­gre­tion is done and run the chrome head­less mode on ubuntu 16.04 terminal,thanks in advance.