Skip to content

mortzdk/selenium-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Server

This repository contains a bash script for starting a selenium node, hub, or standalone server on Linux, MacOS, or Window (Cygwin).

Requirements

The script has a few requirements that are checked, before beginning the execution of the server. These are:

  • arch
  • java
  • wget
  • unzip
  • tar
  • sed
  • jq

Furthermore on Windows, Powershell must be available, since it is used to figure out which browsers are installed and which version they have.

Configuration

The script supports the following arguments on execution e.g. ./server.sh where '{}' describes the required input, '[]' contains the default value and '()' contains a description of the argument:

  • -i (Shows the information about the arguments available for the server)
  • -d (Enable debug mode)
  • -n {NAME} (The name of the application server)
  • -r [standalone] (Which role the server should have. Valid arguments are 'standalone', 'node', 'hub'.)
  • -h {HUB_ADDRESS} (The address to the hub host)
  • -j {JAR_PATH} [newest-selenium-jar] (The path to a selenium server jar)
  • -a {ADDRESS} [0.0.0.0] (The address for which the server should run)
  • -p {PORT} [4444|5555] (The port that the server should run on)
  • -D {JAVA_ARGS} (Arguments supplied to the JAR)
  • -m {MAX_INSTANCES} (The number of supported simultaneous instances of each of the drivers)
  • -c {CONFIG_PATH} [autogenerated_config] (The path to a selenium config json file)

If no configuration file is specified i.e. -c, the script will generate an appropriate configuration file for the server. Moreover the script will download and use the appropriate versions of the Chrome, Opera, Gecko (Firefox), IE, Safari, and Edge drivers based on which browsers are installed on the system, along with the newest version of the selenium server. Each driver will be available from the 'drivers' folder, and will only be downloaded once.

Logs

If possible each driver will maintain its own log which will be stored in the 'logs' folder. Furthermore the selenium server will also maintain a log.

Known issues

Listed here are the known issue of the released versions:

Version 0.1
  • Multiple versions of browsers can be installed on the OS. There should be a way to setup multiple of the same browser instance. This is not yet possible.
  • The Safari support is not yet implemented
  • The script is not yet tested on MacOS

Notes

Listed ehre are some notes worth reading, when using the script:

  • For Edge version >= 44.17763, the edge driver is no longer downloadable. Instead one should run the following command in the Windows command prompt with administrative rights to enable usage of the driver: DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0
  • The IE driver follows the selenium versioning meaning that the driver will probably only work for the specific version of the selenium JAR.
  • On Windows (CygWin) the path to the firefox binary must be set using the system environment PATH, which in turn means that only one instance (version) of firefox can be run for each selenium-server.

About

A bash script to run a selenium-server instance in "standalone", "node" or "hub" mode with the supported drivers of the platform running the script.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published