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
,Capabilities
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
-
Constructor Summary
-
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
(Capabilities capabilities) Merge twoCapabilities
together and return the union of the two as a newCapabilities
instance.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
-
-
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
-
enableBiDi
-
getExtraCapabilityNames
- Specified by:
getExtraCapabilityNames
in classAbstractDriverOptions<FirefoxOptions>
-
getExtraCapability
- Specified by:
getExtraCapability
in classAbstractDriverOptions<FirefoxOptions>
-
merge
Description copied from class:MutableCapabilities
Merge twoCapabilities
together and return the union of the two as a newCapabilities
instance. Capabilities fromother
will override those inthis
.- Specified by:
merge
in interfaceCapabilities
- Overrides:
merge
in classMutableCapabilities
-