Class LazyDriver

java.lang.Object
com.codeborne.selenide.drivercommands.LazyDriver
All Implemented Interfaces:
Driver

public class LazyDriver extends Object implements Driver
A `Driver` implementation which opens browser on demand (on a first call). May be created with its own config, proxy and listeners. This class is NOT thread-safe. Every thread should use its own instance.
  • Constructor Details

    • LazyDriver

      public LazyDriver(Config config, @Nullable org.openqa.selenium.Proxy userProvidedProxy, List<org.openqa.selenium.support.events.WebDriverListener> listeners)
  • Method Details

    • config

      public Config config()
      Specified by:
      config in interface Driver
    • browser

      public Browser browser()
      Specified by:
      browser in interface Driver
    • hasWebDriverStarted

      public boolean hasWebDriverStarted()
      Specified by:
      hasWebDriverStarted in interface Driver
    • getWebDriver

      public org.openqa.selenium.WebDriver getWebDriver()
      Specified by:
      getWebDriver in interface Driver
    • getProxy

      public SelenideProxyServer getProxy()
      Specified by:
      getProxy in interface Driver
    • getAndCheckWebDriver

      public org.openqa.selenium.WebDriver getAndCheckWebDriver()
      Specified by:
      getAndCheckWebDriver in interface Driver
    • browserDownloadsFolder

      public @Nullable DownloadsFolder browserDownloadsFolder()
      Specified by:
      browserDownloadsFolder in interface Driver
    • getBrowserLogs

      public List<org.openqa.selenium.logging.LogEntry> getBrowserLogs()
      Description copied from interface: Driver
      Get browser logs collected via BiDi protocol
      Specified by:
      getBrowserLogs in interface Driver
      Returns:
      empty list if BiDi is not enabled in current webdriver instance
    • close

      public void close()
      Specified by:
      close in interface Driver