Package com.xceptance.xlt.api.webdriver
Class XltFirefoxDriver
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebDriver
-
- org.openqa.selenium.firefox.FirefoxDriver
-
- com.xceptance.xlt.api.webdriver.XltFirefoxDriver
-
- All Implemented Interfaces:
HasBiDi,HasDevTools,HasContext,HasExtensions,HasFullPageScreenshot,HasCapabilities,WebStorage,Interactive,JavascriptExecutor,PrintsPage,SearchContext,TakesScreenshot,HasVirtualAuthenticator,WebDriver
public final class XltFirefoxDriver extends FirefoxDriver
An extendedFirefoxDriverwhich allows to record data about requests and browser events or to run Firefox 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
- DomLoading
- DomInteractive
- DomComplete
- DomContentLoadedEventStart
- DomContentLoadedEventEnd
- LoadEventStart
- LoadEventEnd
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.firefox_clientperformance.screenless = true
Note that for the headless mode to work, thexvfbbinary must be installed on the target machine and must be located in one of the directories listed in the PATH environment variable. If this is not the case, the browser will be run with the default display.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXltFirefoxDriver.BuilderBuilder class to createXltFirefoxDriverinstances.-
Nested classes/interfaces inherited from class org.openqa.selenium.firefox.FirefoxDriver
FirefoxDriver.SystemProperty
-
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
RemoteWebDriver.RemoteTargetLocator, RemoteWebDriver.RemoteWebDriverOptions, RemoteWebDriver.When
-
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
WebDriver.Navigation, WebDriver.Options, WebDriver.TargetLocator, WebDriver.Timeouts, WebDriver.Window
-
-
Constructor Summary
Constructors Constructor Description XltFirefoxDriver()Creates a newXltFirefoxDriverinstance with default settings.XltFirefoxDriver(FirefoxOptions options)Creates a newXltFirefoxDriverinstance with the given parameters and otherwise default settings.XltFirefoxDriver(FirefoxOptions options, boolean screenless)Creates a newXltFirefoxDriverinstance with the given parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidquit()protected voidstartSession(Capabilities desiredCapabilities)static XltFirefoxDriver.BuilderxltBuilder()Returns aXltFirefoxDriver.Builderobject to create a newXltFirefoxDriverinstance.-
Methods inherited from class org.openqa.selenium.firefox.FirefoxDriver
builder, getBiDi, getCapabilities, getContext, getDevTools, getFullPageScreenshotAs, getLocalStorage, getSessionStorage, installExtension, installExtension, maybeGetBiDi, maybeGetDevTools, setContext, setFileDetector, uninstallExtension
-
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
addVirtualAuthenticator, execute, execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, findElements, get, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, print, removeVirtualAuthenticator, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, switchTo, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openqa.selenium.JavascriptExecutor
executeScript, getPinnedScripts, pin, unpin
-
-
-
-
Constructor Detail
-
XltFirefoxDriver
public XltFirefoxDriver()
Creates a newXltFirefoxDriverinstance with default settings.
-
XltFirefoxDriver
public XltFirefoxDriver(FirefoxOptions options)
Creates a newXltFirefoxDriverinstance with the given parameters and otherwise default settings.- Parameters:
options- the driver options (may benull)
-
XltFirefoxDriver
public XltFirefoxDriver(FirefoxOptions options, boolean screenless)
Creates a newXltFirefoxDriverinstance with the given parameters.- Parameters:
options- the driver options (may benull)screenless- whether to run the browser in screenless mode (overrides the "xlt.webDriver.firefox_clientperformance.screenless" setting in the configuration)
-
-
Method Detail
-
startSession
protected void startSession(Capabilities desiredCapabilities)
- Overrides:
startSessionin classRemoteWebDriver
-
close
public void close()
- Specified by:
closein interfaceWebDriver- Overrides:
closein classRemoteWebDriver
-
quit
public void quit()
- Specified by:
quitin interfaceWebDriver- Overrides:
quitin classFirefoxDriver
-
xltBuilder
public static XltFirefoxDriver.Builder xltBuilder()
Returns aXltFirefoxDriver.Builderobject to create a newXltFirefoxDriverinstance.- Returns:
- the builder
-
-