
driverfactory.webdriver.localdriver.FirefoxDriverFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AUTOTESTIMATIC-JAVA Show documentation
Show all versions of AUTOTESTIMATIC-JAVA Show documentation
An open-source Selenium Java-based Test automation Framework that allows you to perform multiple actions
to test a web application's functionality, behaviour, which provides easy to use syntax,
and easy to set up environment according to the needed requirements for testing
package driverfactory.webdriver.localdriver;
import org.openqa.selenium.Proxy;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import tools.properties.Properties;
import java.time.Duration;
public class FirefoxDriverFactory extends DriverAbstract {
@Override
protected void startDriver() {
FirefoxOptions options = new FirefoxOptions();
options.addArguments("--" + Properties.web.executionMethod(), "--window-size=1920,1080");
options.setScriptTimeout(Duration.ofSeconds(Properties.timeouts.scriptTimeout()));
options.setPageLoadTimeout(Duration.ofSeconds(Properties.timeouts.pageLoadTimeout()));
if(!Properties.executionOptions.proxySettings().isEmpty()){
Proxy proxy = new Proxy();
proxy.setHttpProxy(Properties.executionOptions.proxySettings());
proxy.setSslProxy(Properties.executionOptions.proxySettings());
options.setProxy(proxy);
}
driver = new FirefoxDriver(options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy