Class XltChromeDriver

  • All Implemented Interfaces:
    HasBiDi, HasCasting, HasCdp, HasLaunchApp, HasNetworkConditions, HasPermissions, HasDevTools, HasFederatedCredentialManagement, HasAuthentication, HasCapabilities, HasDownloads, LocationContext, WebStorage, Interactive, JavascriptExecutor, HasLogEvents, NetworkConnection, PrintsPage, SearchContext, TakesScreenshot, HasVirtualAuthenticator, WebDriver

    public class XltChromeDriver
    extends ChromeDriver
    An extended ChromeDriver which allows to record data about requests and browser events or to run Chrome with a virtual display.

    Collected Data

    To collect data about requests and browser events, a special extension will be installed into the browser. This extension provides access to the following information:

    • for requests:
      • start and total processing time
      • URL, status code, response content type
      • sent and received bytes
      • network timings (DNS time, connect time, send time, server busy time, receive time, time to first byte, time to last byte)
    • for browser events:
      • the time after which the event occurred when loading a new page
    The following browser events will be reported:
    • DomLoading
    • DomInteractive
    • DomComplete
    • DomContentLoadedEventStart
    • DomContentLoadedEventEnd
    • LoadEventStart
    • LoadEventEnd
    • FirstPaint
    • FirstContentfulPaint
    All this data will be available in the XLT load test report. Request data is shown in the Requests section and browser events can be found in the Page Load Timings section.

    Headless Mode

    On Unix machines, it is possible to run the browser in "headless" mode, i.e. with a virtual display. To put the browser in headless mode, simply set the following property in the configuration of your test project:

     xlt.webDriver.chrome_clientperformance.screenless = true
     
    Note that for the headless mode to work, the xvfb binary must be installed on the target machine and must be findable via the PATH variable. If this is not the case, the browser will be run with the default display.
    • Constructor Detail

      • XltChromeDriver

        public XltChromeDriver()
        Creates a new XltChromeDriver instance with default settings.
      • XltChromeDriver

        public XltChromeDriver​(ChromeOptions options)
        Creates a new XltChromeDriver instance with the given parameters and otherwise default settings.
        Parameters:
        options - the options to use (may be null)
      • XltChromeDriver

        public XltChromeDriver​(ChromeOptions options,
                               boolean screenless)
        Creates a new XltChromeDriver instance with the given parameters and otherwise default settings.
        Parameters:
        options - the options to use (may be null)
        screenless - whether to run in headless mode (using Xvfb)
      • XltChromeDriver

        public XltChromeDriver​(ChromeDriverService service)
        Creates a new XltChromeDriver instance with the given parameters and otherwise default settings.
        Parameters:
        service - the driver service (may be null)
      • XltChromeDriver

        public XltChromeDriver​(ChromeDriverService service,
                               ChromeOptions options)
        Creates a new XltChromeDriver instance with the given parameters and otherwise default settings.
        Parameters:
        service - the driver service (may be null)
        options - the options to use (may be null)
      • XltChromeDriver

        public XltChromeDriver​(ChromeDriverService service,
                               ChromeOptions options,
                               boolean screenless)
        Creates a new XltChromeDriver instance with the given parameters.
        Parameters:
        service - the driver service (may be null)
        options - the options to use (may be null)
        screenless - whether to run in headless mode (using Xvfb)