public class BrowserConfigurationOptions extends Object
Selenium.start(). The parameters
set within will override any command-line parameters set for the same option.| 限定符和类型 | 字段和说明 |
|---|---|
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 |
| 构造器和说明 |
|---|
BrowserConfigurationOptions()
Instantiate a blank BrowserConfigurationOptions instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
get(String key) |
String |
getCommandLineFlags() |
boolean |
hasOptions()
Returns true if any options are set in this instance.
|
boolean |
isSet(String key) |
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() |
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.public BrowserConfigurationOptions setSingleWindow()
SINGLE_WINDOW and unsets MULTI_WINDOW.public BrowserConfigurationOptions setMultiWindow()
MULTI_WINDOW and unsets SINGLE_WINDOWpublic BrowserConfigurationOptions setBrowserExecutablePath(String executablePath)
executablePath - the full path for the browser executable.public BrowserConfigurationOptions setTimeoutInSeconds(int timeout)
timeout - the timeout for all commandspublic BrowserConfigurationOptions setBrowserMode(String mode)
mode - - examples "HTA" or "PROXY"public BrowserConfigurationOptions setCommandLineFlags(String cmdLineFlags)
public String getCommandLineFlags()
public boolean isSet(String key)
public BrowserConfigurationOptions set(String key, String value)
key - the name of the keyvalue - the value for the key