public class FirefoxOptions extends org.openqa.selenium.remote.AbstractDriverOptions<FirefoxOptions>
An example of usage:
FirefoxOptions options = new FirefoxOptions()
.addPreference("browser.startup.page", 1)
.addPreference("browser.startup.homepage", "https://www.google.co.uk");
WebDriver driver = new FirefoxDriver(options);
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIREFOX_OPTIONS |
| Constructor and Description |
|---|
FirefoxOptions() |
FirefoxOptions(org.openqa.selenium.Capabilities source) |
| 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) |
protected int |
amendHashCode() |
java.util.Map<java.lang.String,java.lang.Object> |
asMap() |
FirefoxBinary |
getBinary()
Constructs a
FirefoxBinary and returns that to be used, and because of this is only
useful when actually starting firefox. |
java.util.Optional<FirefoxBinary> |
getBinaryOrNull() |
FirefoxProfile |
getProfile() |
boolean |
isLegacy() |
FirefoxOptions |
merge(org.openqa.selenium.Capabilities capabilities) |
FirefoxOptions |
setBinary(FirefoxBinary binary) |
FirefoxOptions |
setBinary(java.nio.file.Path path) |
FirefoxOptions |
setBinary(java.lang.String path) |
void |
setCapability(java.lang.String key,
java.lang.Object value) |
FirefoxOptions |
setHeadless(boolean headless) |
FirefoxOptions |
setLegacy(boolean legacy) |
FirefoxOptions |
setLogLevel(FirefoxDriverLogLevel logLevel) |
FirefoxOptions |
setProfile(FirefoxProfile profile) |
setAcceptInsecureCerts, setPageLoadStrategy, setProxy, setStrictFileInteractability, setUnhandledPromptBehavioursetCapability, setCapability, setCapabilitypublic static final java.lang.String FIREFOX_OPTIONS
public FirefoxOptions()
public FirefoxOptions(org.openqa.selenium.Capabilities source)
public FirefoxOptions setLegacy(boolean legacy)
public boolean isLegacy()
public FirefoxOptions setBinary(FirefoxBinary binary)
public FirefoxOptions setBinary(java.nio.file.Path path)
public FirefoxOptions setBinary(java.lang.String path)
public FirefoxBinary getBinary()
FirefoxBinary and returns that to be used, and because of this is only
useful when actually starting firefox.public java.util.Optional<FirefoxBinary> getBinaryOrNull()
public FirefoxOptions setProfile(FirefoxProfile profile)
public FirefoxProfile getProfile()
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 FirefoxOptions setLogLevel(FirefoxDriverLogLevel logLevel)
public FirefoxOptions setHeadless(boolean headless)
public void setCapability(java.lang.String key,
java.lang.Object value)
setCapability in class org.openqa.selenium.MutableCapabilitiespublic java.util.Map<java.lang.String,java.lang.Object> asMap()
asMap in interface org.openqa.selenium.CapabilitiesasMap in class org.openqa.selenium.MutableCapabilitiespublic FirefoxOptions merge(org.openqa.selenium.Capabilities capabilities)
merge in interface org.openqa.selenium.Capabilitiesmerge in class org.openqa.selenium.MutableCapabilitiesprotected int amendHashCode()