selenium.webdriver.phantomjs.service

class selenium.webdriver.phantomjs.service.Service(executable_path, port=0, service_args=None, log_path=None)[source]

Object that manages the starting and stopping of PhantomJS / Ghostdriver

Creates a new instance of the Service

Args :
  • executable_path : Path to PhantomJS binary
  • port : Port the service is running on
  • service_args : A List of other command line options to pass to PhantomJS
  • log_path: Path for PhantomJS service to log to
service_url[source]

Gets the url of the GhostDriver Service

start()[source]

Starts PhantomJS with GhostDriver.

Exceptions :
  • WebDriverException : Raised either when it can’t start the service or when it can’t connect to the service
stop()[source]

Cleans up the process

This Page