public class SafariDriver
extends org.openqa.selenium.remote.RemoteWebDriver
SafariOptions class.org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.Whenorg.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| Modifier and Type | Field and Description |
|---|---|
private SafariDriverService |
service |
static java.lang.String |
USE_LEGACY_DRIVER_CAPABILITY
Capability to force usage of the deprecated SafariDriver extension while running
on macOS Sierra.
|
| Constructor and Description |
|---|
SafariDriver()
Initializes a new SafariDriver} class with default
SafariOptions. |
SafariDriver(org.openqa.selenium.Capabilities desiredCapabilities)
Converts the specified
DesiredCapabilities to a SafariOptions
instance and initializes a new SafariDriver using these options. |
SafariDriver(SafariOptions safariOptions)
Initializes a new SafariDriver using the specified
SafariOptions. |
| Modifier and Type | Method and Description |
|---|---|
private static org.openqa.selenium.remote.CommandExecutor |
getExecutor(SafariOptions options) |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> target) |
void |
setFileDetector(org.openqa.selenium.remote.FileDetector detector) |
protected void |
startClient() |
protected void |
stopClient() |
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, getW3CStandardComplianceLevel, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, startClient, startSession, startSession, stopClient, switchTo, toStringpublic static final java.lang.String USE_LEGACY_DRIVER_CAPABILITY
DesiredCapabilities safariCap = DesiredCapabilities.Safari(); safariCap.setCapability(SafariDriver.USE_LEGACY_DRIVER_CAPABILITY, true); WebDriver driver = new SafariDriver(safariCap);
private SafariDriverService service
public SafariDriver()
SafariOptions.public SafariDriver(org.openqa.selenium.Capabilities desiredCapabilities)
DesiredCapabilities to a SafariOptions
instance and initializes a new SafariDriver using these options.desiredCapabilities - capabilities requested of the driverSafariOptions.fromCapabilities(org.openqa.selenium.Capabilities)public SafariDriver(SafariOptions safariOptions)
SafariOptions.safariOptions - safari specific options / capabilities for the driverprivate static org.openqa.selenium.remote.CommandExecutor getExecutor(SafariOptions options)
public void setFileDetector(org.openqa.selenium.remote.FileDetector detector)
setFileDetector in class org.openqa.selenium.remote.RemoteWebDriverprotected void startClient()
startClient in class org.openqa.selenium.remote.RemoteWebDriverprotected void stopClient()
stopClient in class org.openqa.selenium.remote.RemoteWebDriverpublic <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotgetScreenshotAs in class org.openqa.selenium.remote.RemoteWebDriverorg.openqa.selenium.WebDriverException