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
,org.openqa.selenium.Capabilities
public class SafariOptions extends org.openqa.selenium.remote.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/wd/hub"), options);
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CAPABILITY
Deprecated.No replacement.
-
Constructor Summary
Constructors Constructor Description SafariOptions()
SafariOptions(org.openqa.selenium.Capabilities source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
amendHashCode()
java.util.Map<java.lang.String,java.lang.Object>
asMap()
boolean
equals(java.lang.Object arg0)
static SafariOptions
fromCapabilities(org.openqa.selenium.Capabilities capabilities)
Construct aSafariOptions
instance from given capabilities.boolean
getAutomaticInspection()
boolean
getAutomaticProfiling()
java.lang.Object
getCapability(java.lang.String arg0)
java.util.Set<java.lang.String>
getCapabilityNames()
org.openqa.selenium.Platform
getPlatform()
boolean
getUseTechnologyPreview()
int
hashCode()
SafariOptions
merge(org.openqa.selenium.Capabilities extraCapabilities)
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.java.util.Map<java.lang.String,java.lang.Object>
toJson()
java.lang.String
toString()
-
Methods inherited from class org.openqa.selenium.remote.AbstractDriverOptions
setAcceptInsecureCerts, setPageLoadStrategy, setProxy, setStrictFileInteractability, setUnhandledPromptBehaviour
-
Methods inherited from class org.openqa.selenium.MutableCapabilities
setCapability, setCapability, setCapability, setCapability
-
-
-
-
Field Detail
-
CAPABILITY
@Deprecated public static final java.lang.String CAPABILITY
Deprecated.No replacement. Use the methods on this classKey used to store SafariOptions in aCapabilities
object.- See Also:
- Constant Field Values
-
-
Method Detail
-
merge
public SafariOptions merge(org.openqa.selenium.Capabilities extraCapabilities)
- Specified by:
merge
in interfaceorg.openqa.selenium.Capabilities
- Overrides:
merge
in classorg.openqa.selenium.MutableCapabilities
-
fromCapabilities
public static SafariOptions fromCapabilities(org.openqa.selenium.Capabilities capabilities) throws org.openqa.selenium.WebDriverException
Construct aSafariOptions
instance from given capabilities. When theCAPABILITY
capability is set, all other capabilities will be ignored!- 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
-
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.
-
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.
-
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.
-
getAutomaticInspection
public boolean getAutomaticInspection()
-
getAutomaticProfiling
public boolean getAutomaticProfiling()
-
getUseTechnologyPreview
public boolean getUseTechnologyPreview()
-
amendHashCode
protected int amendHashCode()
-
asMap
public java.util.Map<java.lang.String,java.lang.Object> asMap()
- Specified by:
asMap
in interfaceorg.openqa.selenium.Capabilities
-
getPlatform
public org.openqa.selenium.Platform getPlatform()
- Specified by:
getPlatform
in interfaceorg.openqa.selenium.Capabilities
-
getCapability
public java.lang.Object getCapability(java.lang.String arg0)
- Specified by:
getCapability
in interfaceorg.openqa.selenium.Capabilities
-
getCapabilityNames
public java.util.Set<java.lang.String> getCapabilityNames()
- Specified by:
getCapabilityNames
in interfaceorg.openqa.selenium.Capabilities
-
toJson
public java.util.Map<java.lang.String,java.lang.Object> toJson()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object arg0)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-