Table of Contents
When using Selenide directly, webdriverchecker-selenide
should be used.
WebDriverChecker
automatically getWebDriver
instance fromcom.codeborne.selenide.impl.WebDriverContainer
viacom.codeborne.selenide.WebDriverRunner.getWebDriver()
method.- You don't need to pass the
WebDriver
instance to the argument of checker methods.
webdriverchecker | webdriverchecker-selenide |
---|---|
WebDriverChecker.isChrome(driver) |
WebDriverChecker.isChrome() |
Add to build.gradle
.
implementation("com.github.ngoanh2n:webdriverchecker-selenide:2.9.0")
Add to pom.xml
.
<dependency>
<groupId>com.github.ngoanh2n</groupId>
<artifactId>webdriverchecker-selenide</artifactId>
<version>2.9.0</version>
</dependency>
public class MyTest {
public void test() {
Selenide.open("https://github.com/ngoanh2n");
// WebDriverShooter could find WebDriver instance from here.
// WebDriverShooter.page(driver) <=> WebDriverShooter.page()
}
}