2

I did a patch in the HtmlUnitDriver.java file, as explained here: Is it possible to ignore JavaScript exceptions when working with WebDriver (HtmlUnit, Ruby bindings)

I've followed the explanations on the selenium build wiki and in the readme, also the tip given here: Building the Selenium Server Project

Still, I don't have a jar file like selenium-server-standalone-2.25.0.jar which can be run and used as a headless browser for selenium tests.

... So I'm trying to recreate the selenium-server-standalone-2.xx.jar file with my patch, and use it to run my headless tests.

Can anyone explain to me how to do this? Thanks!

Community
  • 1
  • 1
Florin Vistig
  • 1,639
  • 2
  • 22
  • 31

2 Answers2

5

The best way I found is to do:

go //java/server/src/org/openqa/selenium/remote/server:server:uber //java/client/src/org/openqa/selenium:client-combined:uber

This will create a single jar for the selenium server

Then run go release.

The resulting .jar should be found in build\dist folder of the selenium source folder. (ex. ./build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar)

See also https://github.com/SeleniumHQ/selenium/wiki/Building-WebDriver#tips.

FelikZ
  • 2,976
  • 4
  • 32
  • 41
Florin Vistig
  • 1,639
  • 2
  • 22
  • 31
1

Here is a step by step building guide for selenium standalone server. The build process of selenium projects may be not so strait forward to newbies, so I recommend this detailed guide on how to create a runnable standalone jar.

http://shengwangi.blogspot.com/2014/08/how-to-build-selenium-from-source.html

Also you can refer to the official document on build selenium. https://code.google.com/p/selenium/wiki/BuildingWebDriver#Building_Selenium_Server

Guest
  • 11
  • 2