com.kazurayam.webdriverfactory.firefox.FirefoxOptionsBuilderImpl.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webdriverfactory Show documentation
Show all versions of webdriverfactory Show documentation
A Java/Groovy library that enbles launching Selenium WebDriver specifying User Profile
The newest version!
package com.kazurayam.webdriverfactory.firefox
import org.openqa.selenium.firefox.FirefoxOptions
class FirefoxOptionsBuilderImpl extends FirefoxOptionsBuilder {
FirefoxOptionsBuilderImpl() {}
FirefoxOptionsBuilderImpl(Map preferences) {
this.preferences = preferences
}
/**
*
*/
@Override
FirefoxOptions build() {
FirefoxOptions options = new FirefoxOptions()
// set location of the Chrome Browser's binary
options.setBinary(FirefoxDriverUtils.getFirefoxBinaryPath().toString());
// set my chrome preferences
//options.setExperimentalOption('prefs', preferences)
// The following lines are copy&pasted from
// https://github.com/SeleniumHQ/selenium/issues/4961
return options
}
}