Package org.openqa.selenium.safari
Class SafariDriver
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebDriver
-
- org.openqa.selenium.safari.SafariDriver
-
- All Implemented Interfaces:
org.openqa.selenium.HasCapabilities
,org.openqa.selenium.interactions.HasInputDevices
,org.openqa.selenium.interactions.Interactive
,org.openqa.selenium.JavascriptExecutor
,org.openqa.selenium.PrintsPage
,org.openqa.selenium.SearchContext
,org.openqa.selenium.TakesScreenshot
,org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator
,org.openqa.selenium.WebDriver
public class SafariDriver extends org.openqa.selenium.remote.RemoteWebDriver
A WebDriver implementation that controls Safari using a browser extension (consequently, only Safari 5.1+ is supported). This driver can be configured using theSafariOptions
class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SafariDriver.WindowType
-
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.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
-
-
Constructor Summary
Constructors Constructor Description SafariDriver()
Initializes a new SafariDriver} class with defaultSafariOptions
.SafariDriver(org.openqa.selenium.Capabilities desiredCapabilities)
Deprecated.SafariDriver(SafariDriverService safariService)
Initializes a new SafariDriver backed by the specifiedSafariDriverService
.SafariDriver(SafariDriverService safariServer, SafariOptions safariOptions)
Initializes a new SafariDriver using the specifiedSafariOptions
.SafariDriver(SafariOptions safariOptions)
Initializes a new SafariDriver using the specifiedSafariOptions
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
newWindow(SafariDriver.WindowType type)
Open either a new tab or window, depending on what is requested, and return the window handle without switching to it.void
setFileDetector(org.openqa.selenium.remote.FileDetector detector)
-
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
addVirtualAuthenticator, builder, close, execute, execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, print, quit, removeVirtualAuthenticator, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, startSession, switchTo, toString
-
-
-
-
Constructor Detail
-
SafariDriver
public SafariDriver()
Initializes a new SafariDriver} class with defaultSafariOptions
.
-
SafariDriver
@Deprecated public SafariDriver(org.openqa.selenium.Capabilities desiredCapabilities)
Deprecated.Converts the specifiedCapabilities
to aSafariOptions
instance and initializes a new SafariDriver using these options.- Parameters:
desiredCapabilities
- capabilities requested of the driver- See Also:
SafariOptions.fromCapabilities(Capabilities)
-
SafariDriver
public SafariDriver(SafariOptions safariOptions)
Initializes a new SafariDriver using the specifiedSafariOptions
.- Parameters:
safariOptions
- safari specific options / capabilities for the driver
-
SafariDriver
public SafariDriver(SafariDriverService safariService)
Initializes a new SafariDriver backed by the specifiedSafariDriverService
.- Parameters:
safariService
- preconfigured safari service
-
SafariDriver
public SafariDriver(SafariDriverService safariServer, SafariOptions safariOptions)
Initializes a new SafariDriver using the specifiedSafariOptions
.- Parameters:
safariOptions
- safari specific options / capabilities for the driver
-
-
Method Detail
-
setFileDetector
public void setFileDetector(org.openqa.selenium.remote.FileDetector detector)
- Overrides:
setFileDetector
in classorg.openqa.selenium.remote.RemoteWebDriver
-
newWindow
@Beta public java.lang.String newWindow(SafariDriver.WindowType type)
Open either a new tab or window, depending on what is requested, and return the window handle without switching to it.- Returns:
- The handle of the new window.
-
-