selenium.webdriver.remote.server#

Classes

Server([host, port, path, version, ...])

Manage a Selenium Grid (Remote) Server in standalone mode.

class Server(host=None, port=4444, path=None, version=None, log_level='INFO', env=None, java_path=None, startup_timeout=10, args=None)[source]#

Bases: object

Manage a Selenium Grid (Remote) Server in standalone mode.

This class contains functionality for downloading the server and starting/stopping it.

For more information on Selenium Grid, see:
Parameters:
  • host – Hostname or IP address to bind to (determined automatically if not specified).

  • port – Port to listen on (4444 if not specified).

  • path – Path/filename of existing server .jar file (Selenium Manager is used if not specified).

  • version – Version of server to download (latest version if not specified).

  • log_level – Logging level to control logging output (“INFO” if not specified). Available levels: “SEVERE”, “WARNING”, “INFO”, “CONFIG”, “FINE”, “FINER”, “FINEST”.

  • env – Mapping that defines the environment variables for the server process.

  • java_path – Path to the java executable to run the server.

  • args – Arguments for the standalone server command. Defaults to enabling Selenium Manager and managed downloads; pass a list to override these entirely (e.g. to pin drivers with “–driver-configuration”).

DEFAULT_ARGS = ('--selenium-manager', 'true', '--enable-managed-downloads', 'true')#
property startup_timeout#
property status_url#
property path#
property port#
property version#
property log_level#
property env#
property java_path#
download_if_needed(version=None)[source]#

Download the server if it doesn’t already exist.

Latest version is downloaded unless specified.

start()[source]#

Start the server.

Selenium Manager will detect the server location and download it if necessary, unless an existing server path was specified.

stop()[source]#

Stop the server.