at.willhaben.willtest.rule.LocalFirefoxProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core classes with as few dependencies as possible
package at.willhaben.willtest.rule;
import at.willhaben.willtest.config.FirefoxConfiguration;
import at.willhaben.willtest.config.WebDriverConfigurationParticipant;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Starts a local firefox instance. For configuration you can use {@link #setFirefoxConfiguration(FirefoxConfiguration)},
* {@link #addWebDriverConfigurationParticipant(WebDriverConfigurationParticipant)} methods
*/
@Deprecated
public class LocalFirefoxProvider extends AbstractFirefoxProvider {
@Override
public FirefoxDriver constructWebDriver(DesiredCapabilities desiredCapabilities) {
FirefoxBinary firefoxBinary = getFirefoxConfiguration().getFirefoxBinary();
FirefoxProfile profile = getFirefoxConfiguration().getFirefoxProfile();
FirefoxOptions firefoxOptions = new FirefoxOptions(desiredCapabilities);
firefoxOptions.setBinary(firefoxBinary);
firefoxOptions.setProfile(profile);
return new FirefoxDriver(firefoxOptions);
}
@Override
public LocalFirefoxProvider getThis() {
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy