com.opera.core.systems
Enum OperaSettings.Capability

java.lang.Object
  extended by java.lang.Enum<OperaSettings.Capability>
      extended by com.opera.core.systems.OperaSettings.Capability
All Implemented Interfaces:
Serializable, Comparable<OperaSettings.Capability>
Enclosing class:
OperaSettings

public static enum OperaSettings.Capability
extends Enum<OperaSettings.Capability>

The capabilities specifically available to Opera. The capabilities may be used with DesiredCapabilities.opera().


Enum Constant Summary
ARGUMENTS
          (String) Arguments to pass to Opera, separated by spaces.
AUTOSTART
          (Boolean) Whether to auto-start the Opera binary.
BACKEND
          Deprecated.  
BINARY
          (String/File) Path to the Opera binary to use.
DETACH
          (Boolean) Whether to detach the Opera browser when the driver shuts down.
DISPLAY
          (Integer) The X display to use.
HOST
          (String) The host Opera should connect to.
LAUNCHER
          (String) Path to the launcher binary to use.
LOGGING_FILE
          (String/File) Where to send the output of the logging.
LOGGING_LEVEL
          (String/Level/Integer) How verbose the logging should be.
NO_QUIT
          Deprecated. replaced by DETACH
NO_RESTART
          Deprecated.  
OPERAIDLE
          (Boolean) Whether to use Opera's alternative implicit wait implementation.
PORT
          (Integer) The port to Opera should connect to.
PRODUCT
          (String) The product we are using, for example OperaProduct.DESKTOP or OperaProduct.CORE.
PROFILE
          (OperaProfile/String) Directory of the profile to use, or an OperaProfile instance object representing a profile.
 
Method Summary
static OperaSettings.Capability findCapability(String capabilityName)
          Looks up a capability by its capability name.
 String getCapability()
          Gets the string representation of this capability for use in DesiredCapabilities.
 String getIdentifier()
          Returns the identifier of the capability (used in OperaSettings without it's CAPABILITY_PREFIX.
 String toString()
          Gets the string representation of this capability.
static OperaSettings.Capability valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OperaSettings.Capability[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOGGING_LEVEL

public static final OperaSettings.Capability LOGGING_LEVEL
(String/Level/Integer) How verbose the logging should be. Available levels are: SEVERE (highest value), WARNING, INFO, CONFIG, FINE, FINER, FINEST (lowest value), ALL, OFF. Default is INFO. The argument may consist of either a level name as a string, an integer value, a Level reference, or null. If the value is neither of a known name nor an integer, an IllegalArgumentException will be thrown.


LOGGING_FILE

public static final OperaSettings.Capability LOGGING_FILE
(String/File) Where to send the output of the logging. Default is to not write to file.


BINARY

public static final OperaSettings.Capability BINARY
(String/File) Path to the Opera binary to use. If not specified, OperaDriver will guess the path to your Opera installation (typically /usr/bin/opera, C:\Program Files\Opera\opera.exe, or similar).


ARGUMENTS

public static final OperaSettings.Capability ARGUMENTS
(String) Arguments to pass to Opera, separated by spaces. See opera -help for available command-line switches.


HOST

public static final OperaSettings.Capability HOST
(String) The host Opera should connect to. Since OperaDriver works in a client-server relationship to Opera (where Opera is the client, driver the server) you can also run remote instances of Opera on other devices; that be a phone, a TV or another computer.


PORT

public static final OperaSettings.Capability PORT
(Integer) The port to Opera should connect to. Setting this capability to 0 will probe for a free, random port, setting it to -1 will ensure compatibility mode using port the default port 7001 for Operas version 11.52 or older.


LAUNCHER

public static final OperaSettings.Capability LAUNCHER
(String) Path to the launcher binary to use. The launcher is an external wrapper around the browser, and is used for controlling the binary and taking external screenshots. If left blank, OperaDriver will use a launcher supplied with the package.


PROFILE

public static final OperaSettings.Capability PROFILE
(OperaProfile/String) Directory of the profile to use, or an OperaProfile instance object representing a profile. If null is given, a random temporary directory is used. If "", an empty string, then the default ~/.autotest profile directory will be used (for backwards compatibility with Opera < 11.60).


OPERAIDLE

public static final OperaSettings.Capability OPERAIDLE
(Boolean) Whether to use Opera's alternative implicit wait implementation. It will use an in-browser heuristic to guess when a page has finished loading, allowing us with great accuracy tell whether there are any planned events in the document. This functionality is useful for very simple test cases, but not designed for real-world testing. It is disabled by default.


DISPLAY

public static final OperaSettings.Capability DISPLAY
(Integer) The X display to use. If set, Opera will be started on the specified display. (Only works on GNU/Linux.)


AUTOSTART

public static final OperaSettings.Capability AUTOSTART
(Boolean) Whether to auto-start the Opera binary. If false, OperaDriver will wait for a connection from the browser. Go to "opera:debug", enter the correct host/port information, and hit "Connect" to connect manually.


NO_RESTART

@Deprecated
public static final OperaSettings.Capability NO_RESTART
Deprecated. 
(Boolean) Whether to restart Opera on OperaDesktopDriver reinitialization. This option only applies to the Desktop Driver.


NO_QUIT

@Deprecated
public static final OperaSettings.Capability NO_QUIT
Deprecated. replaced by DETACH
(Boolean) Whether to quit Opera when OperaDriver is shut down. If enabled, it will keep the browser running after the driver is shut down.


DETACH

public static final OperaSettings.Capability DETACH
(Boolean) Whether to detach the Opera browser when the driver shuts down. This will leave Opera running.

Since:
0.12

PRODUCT

public static final OperaSettings.Capability PRODUCT
(String) The product we are using, for example OperaProduct.DESKTOP or OperaProduct.CORE.


BACKEND

@Deprecated
public static final OperaSettings.Capability BACKEND
Deprecated. 
(String) Rendering backend used by internal builds of Opera. If null or an empty string, "software" is used by default. Warning: This is a temporary workaround for launcher not taking external window-only screenshots on Windows.

Method Detail

values

public static OperaSettings.Capability[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OperaSettings.Capability c : OperaSettings.Capability.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OperaSettings.Capability valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getIdentifier

public String getIdentifier()
Returns the identifier of the capability (used in OperaSettings without it's CAPABILITY_PREFIX.

Returns:
the unique identifier of a capability

getCapability

public String getCapability()
Gets the string representation of this capability for use in DesiredCapabilities.

Returns:
capability name for use with DesiredCapabilities

toString

public String toString()
Gets the string representation of this capability.

Overrides:
toString in class Enum<OperaSettings.Capability>
Returns:
easy to read string representation

findCapability

public static OperaSettings.Capability findCapability(String capabilityName)
Looks up a capability by its capability name.

Parameters:
capabilityName - the string representation of the capability
Returns:
the corresponding capability


Copyright © 2012. All Rights Reserved.