Open
Description
The code provided in this sample, didn't work for me correctly: when the test ended, BrowserStack session didn't end, and it finished after several minutes with timeout.
The recommended code is:
@AfterMethod(alwaysRun=true)
public void tearDown() throws Exception {
WebDriverRunner.closeWebDriver();
if (l != null) l.stop();
}
But after investigation I found out the following code was running:
com.codeborne.selenide.drivercommands.WebDriverWrapper#close
/**
* Does not close webdriver.
* This class holds a webdriver created by user - in this case user is responsible for closing webdriver by himself.
*/
@Override
public void close() {
}
So, after I replaced "WebDriverRunner.closeWebDriver();" with "WebDriverRunner.getWebDriver().quit();", Browserstack session was ended correctly.
It looks like this sample needs to be updated, unless it's something wrong with my code.
Libraries used: Selenide:5.2.3, cucumber-junit:4.3.1
Metadata
Metadata
Assignees
Labels
No labels