org.openqa.selenium.firefox
Class FirefoxDriver
java.lang.Object
org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.firefox.FirefoxDriver
- All Implemented Interfaces:
- HasCapabilities, HasInputDevices, FindsByClassName, FindsByCssSelector, FindsById, FindsByLinkText, FindsByName, FindsByTagName, FindsByXPath, JavascriptExecutor, SearchContext, TakesScreenshot, WebDriver
public class FirefoxDriver
- extends RemoteWebDriver
- implements TakesScreenshot
An implementation of the {#link WebDriver} interface that drives Firefox. This works through a firefox extension,
which gets installed automatically if necessary. Important system variables are:
- webdriver.firefox.bin - Which firefox binary to use (normally "firefox" on the PATH).
- webdriver.firefox.profile - The name of the profile to use (normally "WebDriver").
When the driver starts, it will make a copy of the profile it is using, rather than using that profile directly.
This allows multiple instances of firefox to be started.
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver |
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, getKeyboard, getMouse, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, startSession, switchTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BINARY
public static final String BINARY
- See Also:
- Constant Field Values
PROFILE
public static final String PROFILE
- See Also:
- Constant Field Values
DEFAULT_ENABLE_NATIVE_EVENTS
public static final boolean DEFAULT_ENABLE_NATIVE_EVENTS
ACCEPT_UNTRUSTED_CERTIFICATES
public static final boolean ACCEPT_UNTRUSTED_CERTIFICATES
- See Also:
- Constant Field Values
ASSUME_UNTRUSTED_ISSUER
public static final boolean ASSUME_UNTRUSTED_ISSUER
- See Also:
- Constant Field Values
binary
protected FirefoxBinary binary
FirefoxDriver
public FirefoxDriver()
FirefoxDriver
public FirefoxDriver(FirefoxProfile profile)
FirefoxDriver
public FirefoxDriver(Capabilities capabilities)
FirefoxDriver
public FirefoxDriver(FirefoxBinary binary,
FirefoxProfile profile)
startClient
protected void startClient()
- Overrides:
startClient
in class RemoteWebDriver
connectTo
protected ExtensionConnection connectTo(FirefoxBinary binary,
FirefoxProfile profile,
String host)
obtainLock
protected Lock obtainLock()
stopClient
protected void stopClient()
- Overrides:
stopClient
in class RemoteWebDriver
newRemoteWebElement
protected FirefoxWebElement newRemoteWebElement()
- Overrides:
newRemoteWebElement
in class RemoteWebDriver
getScreenshotAs
public <X> X getScreenshotAs(OutputType<X> target)
- Specified by:
getScreenshotAs
in interface TakesScreenshot
saveScreenshot
@Deprecated
public void saveScreenshot(File pngFile)
- Deprecated. Use getScreenshotAs(file), which returns a temporary file.
- Saves a screenshot of the current page into the given file.
Copyright © 2011. All Rights Reserved.