at.willhaben.willtest.rule.AbstractFirefoxProvider Maven / Gradle / Ivy
Show all versions of core Show documentation
package at.willhaben.willtest.rule;
import at.willhaben.willtest.config.FirefoxConfiguration;
import at.willhaben.willtest.config.WebDriverConfigurationParticipant;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
/**
* Parent class for all implementations of {@link at.willhaben.willtest.config.SeleniumProvider} for Firefox.
* Injects the output {@link org.openqa.selenium.firefox.FirefoxProfile} of {@link FirefoxConfiguration} as
* {@link WebDriverConfigurationParticipant}.
* @param type of the provider implementation
* @param type of the webdriver, which will be provided
*/
@Deprecated
public abstract class AbstractFirefoxProvider, D extends WebDriver>
extends AbstractSeleniumProvider
{
private FirefoxConfiguration firefoxConfiguration;
public AbstractFirefoxProvider() {
addWebDriverConfigurationParticipant(new WebDriverConfigurationParticipant() {
@Override
public void addDesiredCapabilities(DesiredCapabilities desiredCapabilities) {
desiredCapabilities.setCapability(FirefoxDriver.PROFILE, firefoxConfiguration.getFirefoxProfile());
}
});
}
protected FirefoxConfiguration getFirefoxConfiguration() {
return firefoxConfiguration;
}
public void setFirefoxConfiguration(FirefoxConfiguration firefoxConfiguration) {
this.firefoxConfiguration = firefoxConfiguration;
}
}