public class FirefoxOptions
extends org.openqa.selenium.MutableCapabilities
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 |
addCapabilities(org.openqa.selenium.Capabilities capabilities)
Deprecated.
Use
merge(Capabilities) . |
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)
Deprecated.
Use
MutableCapabilities.merge(Capabilities) . |
protected int |
amendHashCode() |
java.util.Map<java.lang.String,?> |
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 |
setAcceptInsecureCerts(boolean acceptInsecureCerts) |
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 |
setLogLevel(java.util.logging.Level logLevel)
Deprecated.
|
FirefoxOptions |
setPageLoadStrategy(org.openqa.selenium.PageLoadStrategy strategy) |
FirefoxOptions |
setProfile(FirefoxProfile profile) |
FirefoxOptions |
setUnhandledPromptBehaviour(org.openqa.selenium.UnexpectedAlertBehaviour behaviour) |
org.openqa.selenium.Capabilities |
toCapabilities()
Deprecated.
No replacement. We are already
Capabilities . |
equals, getCapability, hashCode, setCapability, setCapability, setCapability, toString
public 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)
@Deprecated public FirefoxOptions setLogLevel(java.util.logging.Level logLevel)
setLogLevel(FirefoxDriverLogLevel)
public FirefoxOptions setLogLevel(FirefoxDriverLogLevel logLevel)
public FirefoxOptions setPageLoadStrategy(org.openqa.selenium.PageLoadStrategy strategy)
public FirefoxOptions setUnhandledPromptBehaviour(org.openqa.selenium.UnexpectedAlertBehaviour behaviour)
public FirefoxOptions setAcceptInsecureCerts(boolean acceptInsecureCerts)
public FirefoxOptions setHeadless(boolean headless)
public void setCapability(java.lang.String key, java.lang.Object value)
setCapability
in class org.openqa.selenium.MutableCapabilities
public java.util.Map<java.lang.String,?> asMap()
asMap
in interface org.openqa.selenium.Capabilities
asMap
in class org.openqa.selenium.MutableCapabilities
@Deprecated public FirefoxOptions addCapabilities(org.openqa.selenium.Capabilities capabilities)
merge(Capabilities)
.public FirefoxOptions merge(org.openqa.selenium.Capabilities capabilities)
merge
in interface org.openqa.selenium.Capabilities
merge
in class org.openqa.selenium.MutableCapabilities
@Deprecated public org.openqa.selenium.Capabilities toCapabilities()
Capabilities
.@Deprecated public org.openqa.selenium.remote.DesiredCapabilities addTo(org.openqa.selenium.remote.DesiredCapabilities capabilities)
MutableCapabilities.merge(Capabilities)
.protected int amendHashCode()
amendHashCode
in class org.openqa.selenium.MutableCapabilities