-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
How to stop the webdriver to close browser #1801
Comments
You mean leave the browser open after the tests have finished? |
Yes. I mean somewhere is a driver.quit, or driver.close function coded, and i want to suspend it, temporary. I do not found it (i use serenity.conf file, and extend the PageObject class for my page object files, if that info help) |
This isn't currently supported, but if you want to propose a PR I'd be happy to review. But it is generally very hard knowing that you are finishing the last test, so you may end up with lots of open browsers. |
@wakaleo Is it implemented? |
No |
Hello, this would be very useful indeed. @wakaleo Has it been implemented? |
is there are a posibilitty to close the browser inside a stepdefinition?, if' isn't , there is some way to execute or launch one browser for each row off data table in my feature? I mean, one browser for each one these rows test
|
Hi, Due this issue, I am not able to execute whole regression test suite in one go where multiple tests are performed with different browser instance. I also tried to setup "serenity.restart.browser.for.each=never" properly in serenity.conf . After this new browser window is not invoked for next test but log-off does happen. So the question here is how can I add script for logging off before driver.close or quit() Please help, Thanks |
Is below requirement implemented?? I want to stop closing the webdriver after the tests, there is any settings for that in the serenity.conf? |
Create a class that implements public class AfterAWebScenarioEnds implements AfterAWebdriverScenario {
@Override
public void apply(EnvironmentVariables environmentVariables, TestOutcome testOutcome, WebDriver webDriver) {
// DO SOMETHING HERE
}
} And add the package to the
|
what exactly I need to write inside apply method because I want the browser to stay open and not be closed. Beacause, Thanks in advance |
Having the browser stay open is not currently supported. However if you need to do something with the browser before the test finishes and the browser closes, that is how you do it. |
Please introduce it. Thats very helpful in debugging |
I want to stop closing the webdriver after the tests, there is any settings for that in the serenity.conf?
Right now i do not use the cucumber hooks, and during writing the test scenarios, i want to hang the driver before it close the browser....
Thanks!
The text was updated successfully, but these errors were encountered: