All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kazurayam.webdriverfactory.firefox.FirefoxOptionsBuilderImpl.groovy Maven / Gradle / Ivy

Go to download

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
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy