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,HasFederatedCredentialManagement,HasContext,HasExtensions,HasFullPageScreenshot,HasCapabilities,HasDownloads,org.openqa.selenium.html5.WebStorage,Interactive,JavascriptExecutor,PrintsPage,SearchContext,TakesScreenshot,HasVirtualAuthenticator,WebDriver
An extended
FirefoxDriver which 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 = trueNote that for the headless mode to work, the
xvfb binary 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 ClassesModifier and TypeClassDescriptionstatic final classBuilder class to createXltFirefoxDriverinstances.Nested classes/interfaces inherited from class org.openqa.selenium.firefox.FirefoxDriver
FirefoxDriver.SystemPropertyNested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
RemoteWebDriver.RemoteTargetLocator, RemoteWebDriver.RemoteWebDriverOptions, RemoteWebDriver.WhenNested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
WebDriver.Navigation, WebDriver.Options, WebDriver.TargetLocator, WebDriver.Timeouts, WebDriver.Window -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionvoidclose()voidquit()protected voidstartSession(Capabilities desiredCapabilities) static XltFirefoxDriver.BuilderReturns aXltFirefoxDriver.Builderobject to create a newXltFirefoxDriverinstance.Methods inherited from class org.openqa.selenium.firefox.FirefoxDriver
builder, getBiDi, getCapabilities, getContext, getFullPageScreenshotAs, getLocalStorage, getSessionStorage, installExtension, installExtension, maybeGetBiDi, setContext, setFileDetector, uninstallExtensionMethods inherited from class org.openqa.selenium.remote.RemoteWebDriver
addVirtualAuthenticator, deleteDownloadableFiles, downloadFile, execute, execute, execute, executeAsyncScript, executeScript, findElement, findElements, findElements, get, getCommandExecutor, getCurrentUrl, getDownloadableFiles, getElementConverter, getErrorHandler, getExecuteMethod, getFederatedCredentialManagementDialog, getFileDetector, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, network, perform, print, removeVirtualAuthenticator, resetCooldown, resetInputState, script, setCommandExecutor, setDelayEnabled, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, switchTo, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openqa.selenium.HasDownloads
requireDownloadsEnabledMethods inherited from interface org.openqa.selenium.JavascriptExecutor
executeScript, getPinnedScripts, pin, unpin
-
Constructor Details
-
XltFirefoxDriver
public XltFirefoxDriver()Creates a newXltFirefoxDriverinstance with default settings. -
XltFirefoxDriver
Creates a newXltFirefoxDriverinstance with the given parameters and otherwise default settings.- Parameters:
options- the driver options (may benull)
-
XltFirefoxDriver
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 Details
-
startSession
- 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
Returns aXltFirefoxDriver.Builderobject to create a newXltFirefoxDriverinstance.- Returns:
- the builder
-