Selenium bad magic number error

Using selenium for acceptance tests?

It usually run fine, until I got bad magic number error when trying to run any version:

invalid file (bad magic number): Exec format error

It is quite confusing message, basically it means that it cannot be executed. Solution is to execute it using java with -jar option:

java -jar selenium-server-standalone-3.0.1.jar

To make it easier, selenium bootstrap file can be created to launch it:

java -jar /usr/local/bin/selenium-server-standalone-3.0.1.jar
This file can be named, for example /usr/local/bin/selenium with jar file located in same directory.
  • Projects