org.openqa.selenium.firefox
Class FirefoxDriver

java.lang.Object
  extended by org.openqa.selenium.remote.RemoteWebDriver
      extended by org.openqa.selenium.firefox.FirefoxDriver
All Implemented Interfaces:
org.openqa.selenium.HasCapabilities, org.openqa.selenium.HasInputDevices, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.internal.Killable, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver

public class FirefoxDriver
extends RemoteWebDriver
implements org.openqa.selenium.TakesScreenshot, org.openqa.selenium.internal.Killable

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:

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.


Nested Class Summary
 
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
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
 
Field Summary
static boolean ACCEPT_UNTRUSTED_CERTIFICATES
          Deprecated. 
static boolean ASSUME_UNTRUSTED_ISSUER
          Deprecated. 
protected  FirefoxBinary binary
           
static String BINARY
           
static boolean DEFAULT_ENABLE_NATIVE_EVENTS
           
static String PROFILE
           
 
Constructor Summary
FirefoxDriver()
           
FirefoxDriver(org.openqa.selenium.Capabilities desiredCapabilities)
           
FirefoxDriver(org.openqa.selenium.Capabilities desiredCapabilities, org.openqa.selenium.Capabilities requiredCapabilities)
           
FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile)
           
FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile, org.openqa.selenium.Capabilities capabilities)
           
FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile, org.openqa.selenium.Capabilities desiredCapabilities, org.openqa.selenium.Capabilities requiredCapabilities)
           
FirefoxDriver(FirefoxProfile profile)
           
 
Method Summary
protected  ExtensionConnection connectTo(FirefoxBinary binary, FirefoxProfile profile, String host)
           
<X> X
getScreenshotAs(org.openqa.selenium.OutputType<X> target)
           
 void kill()
          Attempt to forcibly kill this Killable at the OS level.
 org.openqa.selenium.WebDriver.Options manage()
           
protected  org.openqa.selenium.internal.Lock obtainLock()
           
 void setFileDetector(FileDetector detector)
           
protected  void startClient()
           
protected  void stopClient()
           
 
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, getFileDetector, getKeyboard, getMouse, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, navigate, quit, setCommandExecutor, setElementConverter, setFoundBy, setLogLevel, setSessionId, startSession, startSession, switchTo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

@Deprecated
public static final boolean ACCEPT_UNTRUSTED_CERTIFICATES
Deprecated. 
See Also:
Constant Field Values

ASSUME_UNTRUSTED_ISSUER

@Deprecated
public static final boolean ASSUME_UNTRUSTED_ISSUER
Deprecated. 
See Also:
Constant Field Values

binary

protected FirefoxBinary binary
Constructor Detail

FirefoxDriver

public FirefoxDriver()

FirefoxDriver

public FirefoxDriver(FirefoxProfile profile)

FirefoxDriver

public FirefoxDriver(org.openqa.selenium.Capabilities desiredCapabilities)

FirefoxDriver

public FirefoxDriver(org.openqa.selenium.Capabilities desiredCapabilities,
                     org.openqa.selenium.Capabilities requiredCapabilities)

FirefoxDriver

public FirefoxDriver(FirefoxBinary binary,
                     FirefoxProfile profile)

FirefoxDriver

public FirefoxDriver(FirefoxBinary binary,
                     FirefoxProfile profile,
                     org.openqa.selenium.Capabilities capabilities)

FirefoxDriver

public FirefoxDriver(FirefoxBinary binary,
                     FirefoxProfile profile,
                     org.openqa.selenium.Capabilities desiredCapabilities,
                     org.openqa.selenium.Capabilities requiredCapabilities)
Method Detail

setFileDetector

public void setFileDetector(FileDetector detector)
Overrides:
setFileDetector in class RemoteWebDriver

kill

public void kill()
Attempt to forcibly kill this Killable at the OS level. Useful where the extension has stopped responding, and you don't want to leak resources. Should not ordinarily be called.

Specified by:
kill in interface org.openqa.selenium.internal.Killable

manage

public org.openqa.selenium.WebDriver.Options manage()
Specified by:
manage in interface org.openqa.selenium.WebDriver
Overrides:
manage in class RemoteWebDriver

startClient

protected void startClient()
Overrides:
startClient in class RemoteWebDriver

connectTo

protected ExtensionConnection connectTo(FirefoxBinary binary,
                                        FirefoxProfile profile,
                                        String host)

obtainLock

protected org.openqa.selenium.internal.Lock obtainLock()

stopClient

protected void stopClient()
Overrides:
stopClient in class RemoteWebDriver

getScreenshotAs

public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target)
Specified by:
getScreenshotAs in interface org.openqa.selenium.TakesScreenshot


Copyright © 2013. All Rights Reserved.