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 |
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 |
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 |
setProxy(org.openqa.selenium.Proxy proxy) |
FirefoxOptions |
setUnhandledPromptBehaviour(org.openqa.selenium.UnexpectedAlertBehaviour behaviour) |
setCapability, setCapability, setCapability
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 FirefoxOptions setProxy(org.openqa.selenium.Proxy proxy)
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,java.lang.Object> asMap()
asMap
in interface org.openqa.selenium.Capabilities
asMap
in class org.openqa.selenium.MutableCapabilities
public FirefoxOptions merge(org.openqa.selenium.Capabilities capabilities)
merge
in interface org.openqa.selenium.Capabilities
merge
in class org.openqa.selenium.MutableCapabilities
protected int amendHashCode()