Can I use a custom browser with Selenium?

I know we can use popular browsers using Selenium WebDriver. But my question is can I a custom made browser with Selenium?

Is it even possible?

2 Likes

Hey Tim,

You can try following the below set of instructions to setup support for a custom browser type when running selenium tests against a Selenium Grid.

  1. Implement the interface org.openqa.selenium.remote.server.DriverProvider (or) extend org.openqa.selenium.remote.server.DefaultDriverProvider wherein you take care of building support for your custom browser.
  2. Create a directory named META-INF\services under your main resources folder and ensure that this directory gets bundled into the jar, when you create a jar out of your project.
  3. Create a service loader file named org.openqa.selenium.remote.server.DriverProvider wherein you add the fully qualified class name of the new class you created in step (1) and place it in the directory created in step (2)
  4. Bundle your project into a jar.
  5. Now start the selenium node by adding the jar created in (4).

Now your new browser is ready to be supported by the Selenium Grid.

Please refer to this selenium-users google forums thread which also talks about the same query wherein the user confirmed that the above mentioned approach worked for them.