Class WebDriverWrapper

  • All Implemented Interfaces:
    Driver

    @ParametersAreNonnullByDefault
    public class WebDriverWrapper
    extends java.lang.Object
    implements Driver
    A `Driver` implementation which uses given webdriver [and proxy]. It doesn't open a new browser. It doesn't start a new proxy.
    • Constructor Detail

      • WebDriverWrapper

        public WebDriverWrapper​(Config config,
                                org.openqa.selenium.WebDriver webDriver,
                                @Nullable
                                SelenideProxyServer selenideProxy)
    • Method Detail

      • getWebDriver

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

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

        public void close()
        Close the webdriver. NB! The behaviour was changed in Selenide 5.4.0 Even if webdriver was created by user - it will be closed. It may hurt if you try to use this browser after closing.
        Specified by:
        close in interface Driver