public class BrowserConfigurationOptions extends Object
Selenium.start()
. The parameters
set within will override any command-line parameters set for the same option.Modifier and Type | Field and Description |
---|---|
static String |
BROWSER_EXECUTABLE_PATH |
static String |
BROWSER_MODE |
static String |
COMMAND_LINE_FLAGS |
static int |
DEFAULT_TIMEOUT_IN_SECONDS |
static String |
MULTI_WINDOW |
static String |
PROFILE_NAME |
static String |
PROXY_CONFIG |
static String |
SINGLE_WINDOW |
static String |
TIMEOUT_IN_SECONDS |
Constructor and Description |
---|
BrowserConfigurationOptions()
Instantiate a blank BrowserConfigurationOptions instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canUse(String value) |
String |
get(String key) |
protected String |
getBrowserExecutablePath() |
protected String |
getBrowserMode() |
String |
getCommandLineFlags() |
protected String |
getProfile() |
protected int |
getTimeoutInSeconds() |
boolean |
hasOptions()
Returns true if any options are set in this instance.
|
protected boolean |
isMultiWindow()
Returns true if the
MULTI_WINDOW field is set. |
boolean |
isSet(String key) |
protected boolean |
isSingleWindow()
Returns true if the
SINGLE_WINDOW field is set. |
String |
serialize()
Serializes to the format "name=value;name=value".
|
BrowserConfigurationOptions |
set(String key,
String value)
Sets the given key to the given value unless the value is null.
|
BrowserConfigurationOptions |
setBrowserExecutablePath(String executablePath)
Sets the full path for the browser executable.
|
BrowserConfigurationOptions |
setBrowserMode(String mode)
Sets the "mode" for the browser.
|
BrowserConfigurationOptions |
setCommandLineFlags(String cmdLineFlags) |
BrowserConfigurationOptions |
setMultiWindow()
Sets
MULTI_WINDOW and unsets SINGLE_WINDOW |
BrowserConfigurationOptions |
setProfile(String profile)
Sets the name of the profile, which must exist in the -profilesLocation directory, to use for
this browser session.
|
BrowserConfigurationOptions |
setSingleWindow()
Sets
SINGLE_WINDOW and unsets MULTI_WINDOW . |
BrowserConfigurationOptions |
setTimeoutInSeconds(int timeout)
Sets the timeout, in seconds, for all commands.
|
String |
toString()
Returns the serialization of this object, as defined by the serialize() method.
|
public static final String PROXY_CONFIG
public static final String PROFILE_NAME
public static final String SINGLE_WINDOW
public static final String MULTI_WINDOW
public static final String BROWSER_EXECUTABLE_PATH
public static final String TIMEOUT_IN_SECONDS
public static final String BROWSER_MODE
public static final String COMMAND_LINE_FLAGS
public static final int DEFAULT_TIMEOUT_IN_SECONDS
public BrowserConfigurationOptions()
public boolean hasOptions()
public String serialize()
public BrowserConfigurationOptions setProfile(String profile)
profile
- the name of the profile.protected String getProfile()
protected boolean isSingleWindow()
SINGLE_WINDOW
field is set.SINGLE_WINDOW
is set.protected boolean isMultiWindow()
MULTI_WINDOW
field is set.MULTI_WINDOW
is set.public BrowserConfigurationOptions setSingleWindow()
SINGLE_WINDOW
and unsets MULTI_WINDOW
.public BrowserConfigurationOptions setMultiWindow()
MULTI_WINDOW
and unsets SINGLE_WINDOW
protected String getBrowserExecutablePath()
public BrowserConfigurationOptions setBrowserExecutablePath(String executablePath)
executablePath
- the full path for the browser executable.public BrowserConfigurationOptions setTimeoutInSeconds(int timeout)
timeout
- the timeout for all commandsprotected int getTimeoutInSeconds()
public BrowserConfigurationOptions setBrowserMode(String mode)
mode
- protected String getBrowserMode()
public BrowserConfigurationOptions setCommandLineFlags(String cmdLineFlags)
public String getCommandLineFlags()
protected boolean canUse(String value)
public boolean isSet(String key)
public BrowserConfigurationOptions set(String key, String value)
key
- the name of the keyvalue
- the value for the keyCopyright © 2013. All Rights Reserved.