org.openqa.selenium.safari
Class SafariDriver

java.lang.Object
  extended by org.openqa.selenium.remote.RemoteWebDriver
      extended by org.openqa.selenium.safari.SafariDriver
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.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver

@Beta
public class SafariDriver
extends RemoteWebDriver
implements org.openqa.selenium.TakesScreenshot

A WebDriver implementation that controls Safari using a browser extension (consequently, only Safari 5.1+ is supported).


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 String CLEAN_SESSION_CAPABILITY
          A boolean capability that instructs the SafariDriver to delete all existing session data when starting a new session.
 
Constructor Summary
SafariDriver()
           
SafariDriver(org.openqa.selenium.Capabilities desiredCapabilities)
           
 
Method Summary
<X> X
getScreenshotAs(org.openqa.selenium.OutputType<X> target)
           
 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, manage, 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

CLEAN_SESSION_CAPABILITY

public static final String CLEAN_SESSION_CAPABILITY
A boolean capability that instructs the SafariDriver to delete all existing session data when starting a new session. This includes browser history, cache, cookies, HTML5 local storage, and HTML5 databases.

Warning: Since Safari uses a single profile for the current user, enabling this capability will permanently erase any existing session data.

See Also:
Constant Field Values
Constructor Detail

SafariDriver

public SafariDriver()

SafariDriver

public SafariDriver(org.openqa.selenium.Capabilities desiredCapabilities)
Method Detail

setFileDetector

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

startClient

protected void startClient()
Overrides:
startClient in class RemoteWebDriver

stopClient

protected void stopClient()
Overrides:
stopClient in class RemoteWebDriver

getScreenshotAs

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


Copyright © 2013. All Rights Reserved.