Package org.openqa.selenium.opera
Class OperaOptions
- java.lang.Object
-
- org.openqa.selenium.MutableCapabilities
-
- org.openqa.selenium.remote.AbstractDriverOptions<OperaOptions>
-
- org.openqa.selenium.opera.OperaOptions
-
- All Implemented Interfaces:
java.io.Serializable
,org.openqa.selenium.Capabilities
@Deprecated public class OperaOptions extends org.openqa.selenium.remote.AbstractDriverOptions<OperaOptions>
Deprecated.Useorg.openqa.selenium.chrome.ChromeDriver
withorg.openqa.selenium.chrome.ChromeOptions#setBinary(File)
ororg.openqa.selenium.chrome.ChromeOptions#setBinary(String)
to set the path to the Opera browser.Example usage:
ChromeOptions options = new ChromeOptions() options.setBinary(new File("/path/to/opera")); // For using Opera browser with ChromeDriver: ChromeDriver driver = new ChromeDriver(options); // For use with RemoteWebDriver: ChromeOptions options = new ChromeOptions(); options.setBinary(new File("/path/to/opera")); RemoteWebDriver driver = new RemoteWebDriver( new URL("http://localhost:4444/"), options);
Class to manage options specific toOperaDriver
.Example usage:
Since operadriver does not support w3c, Selenium will remove the support in the next version.OperaOptions options = new OperaOptions() options.addExtensions(new File("/path/to/extension.crx")) options.setBinary(new File("/path/to/chrome")); // For use with OperaDriver: OperaDriver driver = new OperaDriver(options); // For use with RemoteWebDriver: OperaOptions options = new OperaOptions(); RemoteWebDriver driver = new RemoteWebDriver( new URL("http://localhost:4444/"), options);
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CAPABILITY
Deprecated.Key used to store a set of OperaOptions in aCapabilities
object.
-
Constructor Summary
Constructors Constructor Description OperaOptions()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description OperaOptions
addArguments(java.lang.String... arguments)
Deprecated.OperaOptions
addArguments(java.util.List<java.lang.String> arguments)
Deprecated.Adds additional command line arguments to be used when starting Opera.OperaOptions
addEncodedExtensions(java.lang.String... encoded)
Deprecated.OperaOptions
addEncodedExtensions(java.util.List<java.lang.String> encoded)
Deprecated.Adds a new Opera extension to install on browser startup.OperaOptions
addExtensions(java.io.File... paths)
Deprecated.OperaOptions
addExtensions(java.util.List<java.io.File> paths)
Deprecated.Adds a new Opera extension to install on browser startup.java.lang.Object
getExperimentalOption(java.lang.String name)
Deprecated.Returns the value of an experimental option.protected java.lang.Object
getExtraCapability(java.lang.String capabilityName)
Deprecated.protected java.util.Set<java.lang.String>
getExtraCapabilityNames()
Deprecated.OperaOptions
merge(org.openqa.selenium.Capabilities extraCapabilities)
Deprecated.OperaOptions
setBinary(java.io.File path)
Deprecated.Sets the path to the Opera executable.OperaOptions
setBinary(java.lang.String path)
Deprecated.Sets the path to the Opera executable.OperaOptions
setExperimentalOption(java.lang.String name, java.lang.Object value)
Deprecated.Sets an experimental option.-
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
-
-
-
-
Field Detail
-
CAPABILITY
public static final java.lang.String CAPABILITY
Deprecated.Key used to store a set of OperaOptions in aCapabilities
object.- See Also:
- Constant Field Values
-
-
Method Detail
-
merge
public OperaOptions merge(org.openqa.selenium.Capabilities extraCapabilities)
Deprecated.- Specified by:
merge
in interfaceorg.openqa.selenium.Capabilities
- Overrides:
merge
in classorg.openqa.selenium.MutableCapabilities
-
setBinary
public OperaOptions setBinary(java.io.File path)
Deprecated.Sets the path to the Opera executable. This path should exist on the machine which will launch Opera. The path should either be absolute or relative to the location of running OperaDriver server.- Parameters:
path
- Path to Opera executable.
-
setBinary
public OperaOptions setBinary(java.lang.String path)
Deprecated.Sets the path to the Opera executable. This path should exist on the machine which will launch Opera. The path should either be absolute or relative to the location of running OperaDriver server.- Parameters:
path
- Path to Opera executable.
-
addArguments
public OperaOptions addArguments(java.lang.String... arguments)
Deprecated.- Parameters:
arguments
- The arguments to use when starting Opera.- See Also:
addArguments(java.util.List)
-
addArguments
public OperaOptions addArguments(java.util.List<java.lang.String> arguments)
Deprecated.Adds additional command line arguments to be used when starting Opera.For example:
options.setArguments( "load-extension=/path/to/unpacked_extension", "allow-outdated-plugins");
Each argument may contain an option "--" prefix: "--foo" or "foo". Arguments with an associated value should be delimited with an "=": "foo=bar".
- Parameters:
arguments
- The arguments to use when starting Opera.
-
addExtensions
public OperaOptions addExtensions(java.io.File... paths)
Deprecated.- Parameters:
paths
- Paths to the extensions to install.- See Also:
addExtensions(java.util.List)
-
addExtensions
public OperaOptions addExtensions(java.util.List<java.io.File> paths)
Deprecated.Adds a new Opera extension to install on browser startup. Each path should specify a packed Opera extension (CRX file).- Parameters:
paths
- Paths to the extensions to install.
-
addEncodedExtensions
public OperaOptions addEncodedExtensions(java.lang.String... encoded)
Deprecated.- Parameters:
encoded
- Base64 encoded data of the extensions to install.- See Also:
addEncodedExtensions(java.util.List)
-
addEncodedExtensions
public OperaOptions addEncodedExtensions(java.util.List<java.lang.String> encoded)
Deprecated.Adds a new Opera extension to install on browser startup. Each string data should specify a Base64 encoded string of packed Opera extension (CRX file).- Parameters:
encoded
- Base64 encoded data of the extensions to install.
-
setExperimentalOption
public OperaOptions setExperimentalOption(java.lang.String name, java.lang.Object value)
Deprecated.Sets an experimental option. Useful for new OperaDriver options not yet exposed through theOperaOptions
API.- Parameters:
name
- Name of the experimental option.value
- Value of the experimental option, which must be convertible to JSON.
-
getExperimentalOption
public java.lang.Object getExperimentalOption(java.lang.String name)
Deprecated.Returns the value of an experimental option.- Parameters:
name
- The option name.- Returns:
- The option value, or
null
if not set.
-
getExtraCapabilityNames
protected java.util.Set<java.lang.String> getExtraCapabilityNames()
Deprecated.- Specified by:
getExtraCapabilityNames
in classorg.openqa.selenium.remote.AbstractDriverOptions<OperaOptions>
-
getExtraCapability
protected java.lang.Object getExtraCapability(java.lang.String capabilityName)
Deprecated.- Specified by:
getExtraCapability
in classorg.openqa.selenium.remote.AbstractDriverOptions<OperaOptions>
-
-