public class SafariOptions
extends org.openqa.selenium.MutableCapabilities
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/wd/hub"),
options);
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CAPABILITY
Deprecated.
No replacement. Use the methods on this class
|
Constructor and Description |
---|
SafariOptions() |
SafariOptions(org.openqa.selenium.Capabilities source) |
Modifier and Type | Method and Description |
---|---|
protected int |
amendHashCode() |
java.util.Map<java.lang.String,java.lang.Object> |
asMap() |
static SafariOptions |
fromCapabilities(org.openqa.selenium.Capabilities capabilities)
Construct a
SafariOptions instance from given capabilites. |
boolean |
getAutomaticInspection() |
boolean |
getAutomaticProfiling() |
boolean |
getUseTechnologyPreview() |
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.
|
void |
setCapability(java.lang.String key,
boolean value) |
void |
setCapability(java.lang.String key,
java.lang.Object value) |
SafariOptions |
setProxy(org.openqa.selenium.Proxy proxy) |
SafariOptions |
setUseTechnologyPreview(boolean useTechnologyPreview)
Instruct the SafariDriver to use the Safari Technology Preview if true, otherwise use the
release version of Safari.
|
@Deprecated public static final java.lang.String CAPABILITY
Capabilities
object.public SafariOptions()
public SafariOptions(org.openqa.selenium.Capabilities source)
public SafariOptions merge(org.openqa.selenium.Capabilities extraCapabilities)
merge
in interface org.openqa.selenium.Capabilities
merge
in class org.openqa.selenium.MutableCapabilities
public static SafariOptions fromCapabilities(org.openqa.selenium.Capabilities capabilities) throws org.openqa.selenium.WebDriverException
SafariOptions
instance from given capabilites.
When the CAPABILITY
capability is set, all other capabilities will be ignored!capabilities
- Desired capabilities from which the options are derived.org.openqa.selenium.WebDriverException
- If an error occurred during the reconstruction of the optionspublic SafariOptions setAutomaticInspection(boolean automaticInspection)
automaticInspection
- If true, the SafariDriver will enable the Automation Inspection,
otherwise will disable.public SafariOptions setAutomaticProfiling(boolean automaticProfiling)
automaticProfiling
- If true, the SafariDriver will enable the Automation Profiling,
otherwise will disable.public SafariOptions setUseTechnologyPreview(boolean useTechnologyPreview)
useTechnologyPreview
- If true, the SafariDriver will use the Safari Technology Preview,
otherwise will use the release version of Safari.public void setCapability(java.lang.String key, java.lang.Object value)
setCapability
in class org.openqa.selenium.MutableCapabilities
public void setCapability(java.lang.String key, boolean value)
setCapability
in class org.openqa.selenium.MutableCapabilities
public SafariOptions setProxy(org.openqa.selenium.Proxy proxy)
public boolean getAutomaticInspection()
public boolean getAutomaticProfiling()
public boolean getUseTechnologyPreview()
protected int amendHashCode()
public java.util.Map<java.lang.String,java.lang.Object> asMap()
asMap
in interface org.openqa.selenium.Capabilities
asMap
in class org.openqa.selenium.MutableCapabilities