public class FirefoxOptions
extends java.lang.Object
addTo(DesiredCapabilities)
to also add settings to a DesiredCapabilities
object.
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() |
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) |
FirefoxOptions |
addDesiredCapabilities(org.openqa.selenium.Capabilities desiredCapabilities)
Deprecated.
|
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) |
FirefoxOptions |
addRequiredCapabilities(org.openqa.selenium.Capabilities requiredCapabilities)
Deprecated.
|
org.openqa.selenium.remote.DesiredCapabilities |
addTo(org.openqa.selenium.remote.DesiredCapabilities capabilities) |
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 |
setBinary(FirefoxBinary binary) |
FirefoxOptions |
setBinary(java.nio.file.Path path) |
FirefoxOptions |
setBinary(java.lang.String path) |
FirefoxOptions |
setLegacy(boolean legacy) |
FirefoxOptions |
setLogLevel(java.util.logging.Level logLevel) |
FirefoxOptions |
setProfile(FirefoxProfile profile) |
org.openqa.selenium.Capabilities |
toCapabilities() |
org.openqa.selenium.Capabilities |
toDesiredCapabilities()
Deprecated.
Use
toCapabilities() . |
com.google.gson.JsonObject |
toJson() |
org.openqa.selenium.Capabilities |
toRequiredCapabilities()
Deprecated.
Use
toCapabilities() . |
java.lang.String |
toString() |
public static final java.lang.String FIREFOX_OPTIONS
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(java.util.logging.Level logLevel)
@Deprecated public FirefoxOptions addDesiredCapabilities(org.openqa.selenium.Capabilities desiredCapabilities)
addCapabilities(Capabilities)
@Deprecated public FirefoxOptions addRequiredCapabilities(org.openqa.selenium.Capabilities requiredCapabilities)
addCapabilities(Capabilities)
public FirefoxOptions addCapabilities(org.openqa.selenium.Capabilities capabilities)
public org.openqa.selenium.Capabilities toDesiredCapabilities()
toCapabilities()
.public org.openqa.selenium.Capabilities toRequiredCapabilities()
toCapabilities()
.public org.openqa.selenium.Capabilities toCapabilities()
public org.openqa.selenium.remote.DesiredCapabilities addTo(org.openqa.selenium.remote.DesiredCapabilities capabilities)
public com.google.gson.JsonObject toJson() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object