selenium.webdriver.ie.service

Classes

Service([executable_path, port, host, ...])

Object that manages the starting and stopping of the IEDriver.

class selenium.webdriver.ie.service.Service(executable_path: str | None = None, port: int = 0, host: str | None = None, service_args: Sequence[str] | None = None, log_level: str | None = None, log_output: int | str | IO[Any] | None = None, driver_path_env_key: str | None = None, **kwargs)[source]

Object that manages the starting and stopping of the IEDriver.

Creates a new instance of the Service.

Args:

executable_path: Path to the IEDriver port: Port the service is running on host: (Optional) IP address the service port is bound service_args: (Optional) Sequence of args to be passed to the subprocess when launching the executable. log_level: (Optional) Level of logging of service, may be “FATAL”, “ERROR”, “WARN”, “INFO”, “DEBUG”,

“TRACE”. Default is “FATAL”.

log_output: (Optional) int representation of STDOUT/DEVNULL, any IO instance or String path to file.

Default is “stdout”.

driver_path_env_key: (Optional) Environment variable to use to get the path to the driver executable. **kwargs: Additional keyword arguments to pass to the parent Service class.

command_line_args() list[str][source]

A List of program arguments (excluding the executable).

assert_process_still_running() None[source]

Check if the underlying process is still running.

env_path() str | None[source]
is_connectable() bool[source]

Establish a socket connection to determine if the service is accessible.

Returns:

True if the service is connectable on the configured port, False otherwise.

property path: str
send_remote_shutdown_command() None[source]

Dispatch an HTTP request to the shutdown endpoint to stop the service.

property service_args: Sequence[str]

Returns the sequence of service arguments.

property service_url: str

Gets the url of the Service.

start() None[source]

Starts the Service.

Raises:
WebDriverException: Raised either when it can’t start the service

or when it can’t connect to the service

stop() None[source]

Stops the service.