Package org.openqa.selenium.firefox
Class FirefoxOptions
java.lang.Object
org.openqa.selenium.MutableCapabilities
org.openqa.selenium.remote.AbstractDriverOptions<FirefoxOptions>
org.openqa.selenium.firefox.FirefoxOptions
- All Implemented Interfaces:
Serializable
,org.openqa.selenium.Capabilities
public class FirefoxOptions
extends org.openqa.selenium.remote.AbstractDriverOptions<FirefoxOptions>
Manage firefox specific settings in a way that geckodriver can understand.
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);
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddArguments
(String... arguments) addArguments
(List<String> arguments) addPreference
(String key, Object value) Configures the following: Binarywebdriver.firefox.bin
- the path to the firefox binary Firefox profilewebdriver.firefox.profile
- a named firefox profileConstructs aFirefoxBinary
and returns that to be used, and because of this is only useful when actually starting firefox.protected Object
getExtraCapability
(String capabilityName) merge
(org.openqa.selenium.Capabilities capabilities) setAndroidActivity
(String activity) setAndroidDeviceSerialNumber
(String serial) setAndroidIntentArguments
(String[] args) setAndroidIntentArguments
(List<String> args) setAndroidPackage
(String androidPackage) setBinary
(FirefoxBinary binary) setLogLevel
(FirefoxDriverLogLevel logLevel) setProfile
(FirefoxProfile profile) Methods inherited from class org.openqa.selenium.remote.AbstractDriverOptions
asMap, getCapability, getCapabilityNames, setAcceptInsecureCerts, setBrowserVersion, setEnableDownloads, setImplicitWaitTimeout, setPageLoadStrategy, setPageLoadTimeout, setPlatformName, setProxy, setScriptTimeout, setStrictFileInteractability, setUnhandledPromptBehaviour
Methods inherited from class org.openqa.selenium.MutableCapabilities
equals, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.openqa.selenium.Capabilities
getBrowserName, getBrowserVersion, getPlatformName, is
-
Field Details
-
FIREFOX_OPTIONS
- See Also:
-
-
Constructor Details
-
FirefoxOptions
public FirefoxOptions() -
FirefoxOptions
public FirefoxOptions(org.openqa.selenium.Capabilities source)
-
-
Method Details
-
configureFromEnv
Configures the following:- Binary
webdriver.firefox.bin
- the path to the firefox binary- Firefox profile
webdriver.firefox.profile
- a named firefox profile
-
getBinary
Constructs aFirefoxBinary
and returns that to be used, and because of this is only useful when actually starting firefox. -
setBinary
-
setBinary
-
setBinary
-
getBinaryOrNull
-
getProfile
-
setProfile
-
addArguments
-
addArguments
-
addPreference
-
setLogLevel
-
setAndroidPackage
-
setAndroidActivity
-
setAndroidDeviceSerialNumber
-
setAndroidIntentArguments
-
setAndroidIntentArguments
-
getExtraCapabilityNames
- Specified by:
getExtraCapabilityNames
in classorg.openqa.selenium.remote.AbstractDriverOptions<FirefoxOptions>
-
getExtraCapability
- Specified by:
getExtraCapability
in classorg.openqa.selenium.remote.AbstractDriverOptions<FirefoxOptions>
-
merge
- Specified by:
merge
in interfaceorg.openqa.selenium.Capabilities
- Overrides:
merge
in classorg.openqa.selenium.MutableCapabilities
-