Package com.version1.webdriver
Class WebDriverBuilder
java.lang.Object
com.version1.webdriver.WebDriverBuilder
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.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 typeorg.openqa.selenium.support.events.EventFiringWebDriversetResultsDirectory(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
The 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:
IOException- if log file for browser driver logs cannot be created
-
build
public org.openqa.selenium.support.events.EventFiringWebDriver build(String browser) throws IOException - Throws:
IOException
-