public class FirefoxOptions
extends java.lang.Object
addTo(DesiredCapabilities) to also add settings to a DesiredCapabilities object.
An example of usage:
DesiredCapabilities caps = new FirefoxOptions()
.addPreference("browser.startup.page", 1)
.addPreference("browser.startup.homepage", "https://www.google.co.uk")
.addTo(DesiredCapabilities.firefox());
WebDriver driver = new FirefoxDriver(caps);
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<java.lang.String> |
args |
private java.lang.String |
binary |
private java.util.Map<java.lang.String,java.lang.Boolean> |
booleanPrefs |
static java.lang.String |
FIREFOX_OPTIONS |
private java.util.Map<java.lang.String,java.lang.Integer> |
intPrefs |
static java.lang.String |
OLD_FIREFOX_OPTIONS |
private FirefoxProfile |
profile |
private java.util.Map<java.lang.String,java.lang.String> |
stringPrefs |
| Constructor and Description |
|---|
FirefoxOptions() |
| Modifier and Type | Method and Description |
|---|---|
FirefoxOptions |
addArguments(java.util.List<java.lang.String> arguments) |
FirefoxOptions |
addArguments(java.lang.String... arguments) |
FirefoxOptions |
addPreference(java.lang.String key,
boolean value) |
FirefoxOptions |
addPreference(java.lang.String key,
int value) |
FirefoxOptions |
addPreference(java.lang.String key,
java.lang.String value) |
org.openqa.selenium.remote.DesiredCapabilities |
addTo(org.openqa.selenium.remote.DesiredCapabilities capabilities) |
FirefoxOptions |
setBinary(java.nio.file.Path path) |
FirefoxOptions |
setBinary(java.lang.String binary) |
FirefoxOptions |
setProfile(FirefoxProfile profile) |
(package private) FirefoxOptions |
setProfileSafely(FirefoxProfile profile) |
com.google.gson.JsonElement |
toJson() |
public static final java.lang.String FIREFOX_OPTIONS
public static final java.lang.String OLD_FIREFOX_OPTIONS
private java.lang.String binary
private FirefoxProfile profile
private java.util.List<java.lang.String> args
private java.util.Map<java.lang.String,java.lang.Boolean> booleanPrefs
private java.util.Map<java.lang.String,java.lang.Integer> intPrefs
private java.util.Map<java.lang.String,java.lang.String> stringPrefs
public FirefoxOptions setBinary(java.nio.file.Path path)
public FirefoxOptions setBinary(java.lang.String binary)
public FirefoxOptions setProfile(FirefoxProfile profile)
FirefoxOptions setProfileSafely(FirefoxProfile profile)
public FirefoxOptions addArguments(java.lang.String... arguments)
public FirefoxOptions addArguments(java.util.List<java.lang.String> arguments)
public FirefoxOptions addPreference(java.lang.String key, boolean value)
public FirefoxOptions addPreference(java.lang.String key, int value)
public FirefoxOptions addPreference(java.lang.String key, java.lang.String value)
public org.openqa.selenium.remote.DesiredCapabilities addTo(org.openqa.selenium.remote.DesiredCapabilities capabilities)
public com.google.gson.JsonElement toJson()
throws java.io.IOException
java.io.IOException