Skip to content

Browserstack session not ended correctly with the code provided #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
marinataranchuk opened this issue Jul 1, 2019 · 0 comments

Comments

@marinataranchuk
Copy link

marinataranchuk commented Jul 1, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant