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:
java.io.Serializable
,Capabilities
public class SafariOptions extends AbstractDriverOptions<SafariOptions>
Class to manage options specific toSafariDriver
.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SafariOptions()
SafariOptions(Capabilities source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SafariOptions
fromCapabilities(Capabilities capabilities)
Construct aSafariOptions
instance from given capabilities.boolean
getAutomaticInspection()
boolean
getAutomaticProfiling()
protected java.lang.Object
getExtraCapability(java.lang.String capabilityName)
protected java.util.Set<java.lang.String>
getExtraCapabilityNames()
boolean
getUseTechnologyPreview()
SafariOptions
merge(Capabilities extraCapabilities)
Merge twoCapabilities
together and return the union of the two as a newCapabilities
instance.SafariOptions
setAutomaticInspection(boolean automaticInspection)
Instruct the SafariDriver to enable the Automatic Inspection if true, otherwise disable the automatic inspection.SafariOptions
setAutomaticProfiling(boolean automaticProfiling)
Instruct the SafariDriver to enable the Automatic profiling if true, otherwise disable the automatic profiling.SafariOptions
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, setImplicitWaitTimeout, setPageLoadStrategy, setPageLoadTimeout, setPlatformName, setProxy, setScriptTimeout, setStrictFileInteractability, setUnhandledPromptBehaviour
-
Methods inherited from class org.openqa.selenium.MutableCapabilities
equals, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openqa.selenium.Capabilities
getBrowserName, getBrowserVersion, getPlatformName, is
-
-
-
-
Constructor Detail
-
SafariOptions
public SafariOptions()
-
SafariOptions
public SafariOptions(Capabilities source)
-
-
Method Detail
-
fromCapabilities
public static SafariOptions fromCapabilities(Capabilities capabilities) throws WebDriverException
Construct aSafariOptions
instance from given capabilities.- Parameters:
capabilities
- Desired capabilities from which the options are derived.- Returns:
- SafariOptions
- Throws:
WebDriverException
- If an error occurred during the reconstruction of the options
-
merge
public SafariOptions merge(Capabilities extraCapabilities)
Description copied from class:MutableCapabilities
Merge twoCapabilities
together and return the union of the two as a newCapabilities
instance. Capabilities fromother
will override those inthis
.- Specified by:
merge
in interfaceCapabilities
- Overrides:
merge
in classMutableCapabilities
-
getAutomaticInspection
public boolean getAutomaticInspection()
-
setAutomaticInspection
public SafariOptions setAutomaticInspection(boolean automaticInspection)
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
public SafariOptions setAutomaticProfiling(boolean automaticProfiling)
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
public SafariOptions setUseTechnologyPreview(boolean useTechnologyPreview)
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
protected java.util.Set<java.lang.String> getExtraCapabilityNames()
- Specified by:
getExtraCapabilityNames
in classAbstractDriverOptions<SafariOptions>
-
getExtraCapability
protected java.lang.Object getExtraCapability(java.lang.String capabilityName)
- Specified by:
getExtraCapability
in classAbstractDriverOptions<SafariOptions>
-
-