public class FirefoxDriver extends RemoteWebDriver implements Killable
Modifier and Type | Class and Description |
---|---|
static class |
FirefoxDriver.LazyCommandExecutor |
static class |
FirefoxDriver.SystemProperty |
RemoteWebDriver.RemoteTargetLocator, RemoteWebDriver.RemoteWebDriverOptions, RemoteWebDriver.When
WebDriver.ImeHandler, WebDriver.Navigation, WebDriver.Options, WebDriver.TargetLocator, WebDriver.Timeouts, WebDriver.Window
Modifier and Type | Field and Description |
---|---|
static boolean |
ACCEPT_UNTRUSTED_CERTIFICATES
Deprecated.
|
static boolean |
ASSUME_UNTRUSTED_ISSUER
Deprecated.
|
protected FirefoxBinary |
binary |
static java.lang.String |
BINARY |
static boolean |
DEFAULT_ENABLE_NATIVE_EVENTS |
static java.lang.String |
MARIONETTE |
static java.lang.String |
PROFILE |
Constructor and Description |
---|
FirefoxDriver() |
FirefoxDriver(Capabilities desiredCapabilities) |
FirefoxDriver(Capabilities desiredCapabilities,
Capabilities requiredCapabilities) |
FirefoxDriver(FirefoxBinary binary,
FirefoxProfile profile) |
FirefoxDriver(FirefoxBinary binary,
FirefoxProfile profile,
Capabilities capabilities) |
FirefoxDriver(FirefoxBinary binary,
FirefoxProfile profile,
Capabilities desiredCapabilities,
Capabilities requiredCapabilities) |
FirefoxDriver(FirefoxProfile profile) |
FirefoxDriver(GeckoDriverService driverService,
Capabilities desiredCapabilities,
Capabilities requiredCapabilities) |
Modifier and Type | Method and Description |
---|---|
protected ExtensionConnection |
connectTo(FirefoxBinary binary,
FirefoxProfile profile,
java.lang.String host) |
<X> X |
getScreenshotAs(OutputType<X> target)
Capture the screenshot and store it in the specified location.
|
void |
kill()
Attempt to forcibly kill this Killable at the OS level.
|
WebDriver.Options |
manage()
Gets the Option interface
|
protected Lock |
obtainLock(FirefoxProfile profile) |
void |
setFileDetector(FileDetector detector)
Set the file detector to be used when sending keyboard input.
|
protected void |
startClient(Capabilities desiredCapabilities,
Capabilities requiredCapabilities)
Method called before
starting a new session . |
protected void |
stopClient(Capabilities desiredCapabilities,
Capabilities requiredCapabilities)
Method called after executing a
RemoteWebDriver.quit() command. |
close, execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, navigate, quit, setCommandExecutor, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, startClient, startSession, startSession, stopClient, switchTo, toString
public static final java.lang.String BINARY
public static final java.lang.String PROFILE
public static final java.lang.String MARIONETTE
public static final boolean DEFAULT_ENABLE_NATIVE_EVENTS
@Deprecated public static final boolean ACCEPT_UNTRUSTED_CERTIFICATES
@Deprecated public static final boolean ASSUME_UNTRUSTED_ISSUER
protected FirefoxBinary binary
public FirefoxDriver()
public FirefoxDriver(FirefoxProfile profile)
public FirefoxDriver(Capabilities desiredCapabilities)
public FirefoxDriver(Capabilities desiredCapabilities, Capabilities requiredCapabilities)
public FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile)
public FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile, Capabilities capabilities)
public FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile, Capabilities desiredCapabilities, Capabilities requiredCapabilities)
public FirefoxDriver(GeckoDriverService driverService, Capabilities desiredCapabilities, Capabilities requiredCapabilities)
public void setFileDetector(FileDetector detector)
RemoteWebDriver
setFileDetector
in class RemoteWebDriver
detector
- The detector to use. Must not be null.FileDetector
,
LocalFileDetector
,
UselessFileDetector
public void kill()
public WebDriver.Options manage()
WebDriver
manage
in interface WebDriver
manage
in class RemoteWebDriver
WebDriver.Options
protected void startClient(Capabilities desiredCapabilities, Capabilities requiredCapabilities)
RemoteWebDriver
starting a new session
. The default
implementation is a no-op, but subtypes should override this method to define custom behavior.startClient
in class RemoteWebDriver
protected ExtensionConnection connectTo(FirefoxBinary binary, FirefoxProfile profile, java.lang.String host)
protected Lock obtainLock(FirefoxProfile profile)
protected void stopClient(Capabilities desiredCapabilities, Capabilities requiredCapabilities)
RemoteWebDriver
RemoteWebDriver.quit()
command. The default implementation is a no-op,
but subtypes should override this method to define custom behavior.stopClient
in class RemoteWebDriver
public <X> X getScreenshotAs(OutputType<X> target)
TakesScreenshot
For WebDriver extending TakesScreenshot, this makes a best effort depending on the browser to return the following in order of preference:
For WebElement extending TakesScreenshot, this makes a best effort depending on the browser to return the following in order of preference: - The entire content of the HTML element - The visible portion of the HTML element
getScreenshotAs
in interface TakesScreenshot
getScreenshotAs
in class RemoteWebDriver
X
- Return type for getScreenshotAs.target
- target type, @see OutputType