Class ChromeDriverService


  • public class ChromeDriverService
    extends org.openqa.selenium.remote.service.DriverService
    Manages the life and death of a ChromeDriver server.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CHROME_DRIVER_APPEND_LOG_PROPERTY
      Boolean system property that defines whether chromedriver should append to existing log file.
      static java.lang.String CHROME_DRIVER_EXE_PROPERTY
      System property that defines the location of the chromedriver executable that will be used by the default service.
      static java.lang.String CHROME_DRIVER_LOG_PROPERTY
      System property that defines the location of the log that will be written by the default service.
      static java.lang.String CHROME_DRIVER_SILENT_OUTPUT_PROPERTY
      Boolean system property that defines whether the chromedriver executable should be started in silent mode.
      static java.lang.String CHROME_DRIVER_VERBOSE_LOG_PROPERTY
      Boolean system property that defines whether the chromedriver executable should be started with verbose logging.
      static java.lang.String CHROME_DRIVER_WHITELISTED_IPS_PROPERTY
      System property that defines comma-separated list of remote IPv4 addresses which are allowed to connect to ChromeDriver.
      • Fields inherited from class org.openqa.selenium.remote.service.DriverService

        process
    • Constructor Summary

      Constructors 
      Constructor Description
      ChromeDriverService​(java.io.File executable, int port, com.google.common.collect.ImmutableList<java.lang.String> args, com.google.common.collect.ImmutableMap<java.lang.String,​java.lang.String> environment)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ChromeDriverService createDefaultService()
      Configures and returns a new ChromeDriverService using the default configuration.
      • Methods inherited from class org.openqa.selenium.remote.service.DriverService

        checkExecutable, findExecutable, getArgs, getEnvironment, getOutputStream, getUrl, getUrl, hasShutdownEndpoint, isRunning, sendOutputTo, start, stop, waitUntilAvailable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CHROME_DRIVER_EXE_PROPERTY

        public static final java.lang.String CHROME_DRIVER_EXE_PROPERTY
        System property that defines the location of the chromedriver executable that will be used by the default service.
        See Also:
        Constant Field Values
      • CHROME_DRIVER_LOG_PROPERTY

        public static final java.lang.String CHROME_DRIVER_LOG_PROPERTY
        System property that defines the location of the log that will be written by the default service.
        See Also:
        Constant Field Values
      • CHROME_DRIVER_APPEND_LOG_PROPERTY

        public static final java.lang.String CHROME_DRIVER_APPEND_LOG_PROPERTY
        Boolean system property that defines whether chromedriver should append to existing log file.
        See Also:
        Constant Field Values
      • CHROME_DRIVER_VERBOSE_LOG_PROPERTY

        public static final java.lang.String CHROME_DRIVER_VERBOSE_LOG_PROPERTY
        Boolean system property that defines whether the chromedriver executable should be started with verbose logging.
        See Also:
        Constant Field Values
      • CHROME_DRIVER_SILENT_OUTPUT_PROPERTY

        public static final java.lang.String CHROME_DRIVER_SILENT_OUTPUT_PROPERTY
        Boolean system property that defines whether the chromedriver executable should be started in silent mode.
        See Also:
        Constant Field Values
      • CHROME_DRIVER_WHITELISTED_IPS_PROPERTY

        public static final java.lang.String CHROME_DRIVER_WHITELISTED_IPS_PROPERTY
        System property that defines comma-separated list of remote IPv4 addresses which are allowed to connect to ChromeDriver.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ChromeDriverService

        public ChromeDriverService​(java.io.File executable,
                                   int port,
                                   com.google.common.collect.ImmutableList<java.lang.String> args,
                                   com.google.common.collect.ImmutableMap<java.lang.String,​java.lang.String> environment)
                            throws java.io.IOException
        Parameters:
        executable - The chromedriver executable.
        port - Which port to start the ChromeDriver on.
        args - The arguments to the launched server.
        environment - The environment for the launched server.
        Throws:
        java.io.IOException - If an I/O error occurs.
    • Method Detail

      • createDefaultService

        public static ChromeDriverService createDefaultService()
        Configures and returns a new ChromeDriverService using the default configuration. In this configuration, the service will use the chromedriver executable identified by the CHROME_DRIVER_EXE_PROPERTY system property. Each service created by this method will be configured to use a free port on the current system.
        Returns:
        A new ChromeDriverService using the default configuration.