Package uk.co.evoco.webdriver
Class WebDriverBuilder
java.lang.Object
uk.co.evoco.webdriver.WebDriverBuilder
public class WebDriverBuilder
extends java.lang.Object
This class uses the Builder Pattern to construct its options. Calling .build() will
result in all of the configuration options being assembled and a valid WebDriver object being
supplied to the caller
-
Constructor Summary
Constructors Constructor Description WebDriverBuilder() -
Method Summary
Modifier and Type Method Description org.openqa.selenium.support.events.EventFiringWebDriverbuild()The build method pulls all of the configuration options together and uses them to construct an EventFiringWebDriver with the correct configuration for the browser typeWebDriverBuildersetResultsDirectory(java.io.File screenshotDirectory)
-
Constructor Details
-
WebDriverBuilder
public WebDriverBuilder()
-
-
Method Details
-
setResultsDirectory
- Parameters:
screenshotDirectory- path for the directory storing screenshots- Returns:
- WebDriverBuilder as using builder pattern
-
build
public org.openqa.selenium.support.events.EventFiringWebDriver build() throws java.io.IOExceptionThe build method pulls all of the configuration options together and uses them to construct an EventFiringWebDriver with the correct configuration for the browser type- Returns:
- EventFiringWebDriver representing the configured driver
- Throws:
java.io.IOException- if log file for browser driver logs cannot be created
-