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.EventFiringWebDriver 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
    WebDriverBuilder setResultsDirectory​(java.io.File screenshotDirectory)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setResultsDirectory

      public WebDriverBuilder setResultsDirectory​(java.io.File screenshotDirectory)
      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.IOException
      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:
      java.io.IOException - if log file for browser driver logs cannot be created