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
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 aFirefoxBinaryand returns that to be used, and because of this is only useful when actually starting firefox.protected ObjectgetExtraCapability(String capabilityName) merge(Capabilities capabilities) Merge twoCapabilitiestogether and return the union of the two as a newCapabilitiesinstance.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, setUnhandledPromptBehaviourMethods inherited from class org.openqa.selenium.MutableCapabilities
equals, hashCode, setCapability, setCapability, setCapability, setCapability, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aFirefoxBinaryand 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:
getExtraCapabilityNamesin classAbstractDriverOptions<FirefoxOptions>
-
getExtraCapability
- Specified by:
getExtraCapabilityin classAbstractDriverOptions<FirefoxOptions>
-
merge
Description copied from class:MutableCapabilitiesMerge twoCapabilitiestogether and return the union of the two as a newCapabilitiesinstance. Capabilities fromotherwill override those inthis.- Specified by:
mergein interfaceCapabilities- Overrides:
mergein classMutableCapabilities
-