gridopadesham

An end-to-end documentation on Grid

View the Project on GitHub

Image Courtesy: Boloji.com

«Back Home

Adding Grid support for your new WebDriver implementation

Lets say you have worked on building support for a new browser variant such as Vivaldi and Lets say using Java you have successfully built :

Now you would like to extend this support so that your users can run their Vivaldi based selenium tests in a Grid environment. Wondering what to do ?

Its pretty simple. All that Selenium expects you to do is the following :

  1. Create a file with its name as org.openqa.selenium.remote.server.DriverProvider and place it within a folder named META-INF/services. Inside this file, refer to the class that basically implements org.openqa.selenium.remote.server.DriverProvider (or) which extends org.openqa.selenium.remote.server.DefaultDriverProvider. And yes, you guessed it right again, this is the Service Loader approach that Selenium is using here.

    See here for one such sample file and see here for an actual implementation of DriverProvider interface.

  2. Now spin off your Selenium node using a command such as below. Here we are assuming that our jar which contains the Vivaldi browser’s client bindings is vivaldi-browser.jar.

java -cp vivaldi-browser.jar:selenium-server-standalone-3.141.59.jar \
org.openqa.grid.selenium.GridLauncherV3 -role node

If you are on Windows environment, then the command would be :

java -cp simple-proxy.jar;selenium-server-standalone-3.141.59.jar \
org.openqa.grid.selenium.GridLauncherV3 -role node

Tip:

And that’s it, you now have enabled support for your new web browser in selenium grid.

«Back Home