Package org.openqa.selenium.safari
Class SafariOptions
java.lang.Object
org.openqa.selenium.MutableCapabilities
org.openqa.selenium.remote.AbstractDriverOptions<SafariOptions>
org.openqa.selenium.safari.SafariOptions
- All Implemented Interfaces:
Serializable,org.openqa.selenium.Capabilities
Class to manage options specific to
SafariDriver.
Example usage:
SafariOptions options = new SafariOptions()
options.setUseTechnologyPreview(true);
// For use with SafariDriver:
SafariDriver driver = new SafariDriver(options);
// For use with RemoteWebDriver:
RemoteWebDriver driver = new RemoteWebDriver(
new URL("http://localhost:4444/"),
options);
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SafariOptionsfromCapabilities(org.openqa.selenium.Capabilities capabilities) Construct aSafariOptionsinstance from given capabilities.booleanbooleanprotected ObjectgetExtraCapability(String capabilityName) booleanmerge(org.openqa.selenium.Capabilities extraCapabilities) setAutomaticInspection(boolean automaticInspection) Instruct the SafariDriver to enable the Automatic Inspection if true, otherwise disable the automatic inspection.setAutomaticProfiling(boolean automaticProfiling) Instruct the SafariDriver to enable the Automatic profiling if true, otherwise disable the automatic profiling.setUseTechnologyPreview(boolean useTechnologyPreview) Instruct the SafariDriver to use the Safari Technology Preview if true, otherwise use the release version of Safari.Methods inherited from class org.openqa.selenium.remote.AbstractDriverOptions
asMap, getCapability, getCapabilityNames, setAcceptInsecureCerts, setBrowserVersion, setEnableDownloads, setImplicitWaitTimeout, setPageLoadStrategy, setPageLoadTimeout, setPlatformName, setProxy, setScriptTimeout, setStrictFileInteractability, setUnhandledPromptBehaviourMethods inherited from class org.openqa.selenium.MutableCapabilities
equals, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openqa.selenium.Capabilities
getBrowserName, getBrowserVersion, getPlatformName, is
-
Constructor Details
-
SafariOptions
public SafariOptions() -
SafariOptions
public SafariOptions(org.openqa.selenium.Capabilities source)
-
-
Method Details
-
fromCapabilities
public static SafariOptions fromCapabilities(org.openqa.selenium.Capabilities capabilities) throws org.openqa.selenium.WebDriverException Construct aSafariOptionsinstance from given capabilities.- Parameters:
capabilities- Desired capabilities from which the options are derived.- Returns:
- SafariOptions
- Throws:
org.openqa.selenium.WebDriverException- If an error occurred during the reconstruction of the options
-
merge
- Specified by:
mergein interfaceorg.openqa.selenium.Capabilities- Overrides:
mergein classorg.openqa.selenium.MutableCapabilities
-
getAutomaticInspection
public boolean getAutomaticInspection() -
setAutomaticInspection
Instruct the SafariDriver to enable the Automatic Inspection if true, otherwise disable the automatic inspection. Defaults to disabling the automatic inspection.- Parameters:
automaticInspection- If true, the SafariDriver will enable the Automation Inspection, otherwise will disable.
-
getAutomaticProfiling
public boolean getAutomaticProfiling() -
setAutomaticProfiling
Instruct the SafariDriver to enable the Automatic profiling if true, otherwise disable the automatic profiling. Defaults to disabling the automatic profiling.- Parameters:
automaticProfiling- If true, the SafariDriver will enable the Automation Profiling, otherwise will disable.
-
getUseTechnologyPreview
public boolean getUseTechnologyPreview() -
setUseTechnologyPreview
Instruct the SafariDriver to use the Safari Technology Preview if true, otherwise use the release version of Safari. Defaults to using the release version of Safari.- Parameters:
useTechnologyPreview- If true, the SafariDriver will use the Safari Technology Preview, otherwise will use the release version of Safari.
-
getExtraCapabilityNames
- Specified by:
getExtraCapabilityNamesin classorg.openqa.selenium.remote.AbstractDriverOptions<SafariOptions>
-
getExtraCapability
- Specified by:
getExtraCapabilityin classorg.openqa.selenium.remote.AbstractDriverOptions<SafariOptions>
-