List of usage examples for org.openqa.selenium.firefox FirefoxOptions FirefoxOptions
public FirefoxOptions()
From source file:org.testeditor.fixture.web.WebDriverFixture.java
License:Open Source License
/** * starts Firefox Portable. This works for Versions < 47.0. preferably Firefox * ESR 45.4.0//from w w w.ja va 2 s .c om * * @param browserPath * @return {@code WebDriver} */ @FixtureMethod public WebDriver startFireFoxPortable(String browserPath) throws FixtureException { logger.debug("Starting Firefox Portable on path : {} ...", browserPath); setupDrivermanager(FirefoxDriverManager.getInstance(DriverManagerType.FIREFOX)); logger.trace("WebDriverManager setup executed!"); FirefoxBinary binary = new FirefoxBinary(new File(browserPath)); FirefoxOptions options = new FirefoxOptions(); options.setBinary(binary); FirefoxDriver firefoxdriver = new FirefoxDriver(options); driver = firefoxdriver; logger.trace("Firefox portable setup executed!"); logBrowserVersion(options, firefoxdriver); return driver; }
From source file:org.testeditor.fixture.web.WebDriverFixture.java
License:Open Source License
private FirefoxOptions populateBrowserSettingsForFirefox() throws FixtureException { List<BrowserSetting> options = new ArrayList<>(); // specifying capabilities and options with the aid of the browser type. populateWithBrowserSpecificSettings(BrowserType.FIREFOX, options); FirefoxOptions firefoxOptions = new FirefoxOptions(); // Specific method because Firefox Options consists of key value pairs // with different data types. populateFirefoxOption(options, firefoxOptions); return firefoxOptions; }