serenity-js / serenity-js Public
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
Restarting protractor browser between tests can cause issues #56
Comments
This appears to only happen in versions after 1.2.4. Between the first and second scenario there is a browser instance opened then closed. I have recreated this by pulling down 'tutorial-from-script-to-serenity' and changing serenity-js version to 1.3.0 |
So far it seems like Protractor will kill the browser and spawn a new one after every single test, including the last test, if the
Update: Reported as angular/protractor#4315 Update 2: Looks like a Protractor issue to me, I can reproduce it with Serenity/JS, protractor-cucumber-framework and even the built-in Jasmine adapter; more details here. |
While this is getting investigated by the protractor team, is there a way to manually specify a beforeEach and AfterEach in serenity? would it be in the world.ts file? |
Hey @BlacktoBlue, sure. You can do this using the standard mechanisms of either of the supported test runners: Mocha or Cucumber. Here's an example of using an after hook with cucumber. |
Looks like @darrinholst managed to work around this problem, we'll need something similar... |
Any Progress on this? We're not able to run more than 2 Cucumber-Testscenarios without this errors:
|
@hamber-dick I have managed to work around this by setting restart between tests to false and following @jan-molak example posted above on 23rd of June. |
@jan-molak has any progress been made on this? |
@BlacktoBlue - looks like the protractor issues haven't been addressed and I didn't get a chance to look into any workarounds yet. Thoughts and PRs are welcome! |
@jan-molak : For now do we have any workarounds/suggestion, that we can use with serenity-js |
…ore starting a scenario This is to align the behaviour with @serenity-js/jasmine and ensure restarting the browser when the @serenity-js/cucumber module is combined with @serenity-js/protractor does not cause invalid WebDriver session errors. Closes #56
Version |
It seems like restarting the protractor browser between tests can cause some issues:
The possible root cause of those issues could be related to:
It would be great to get a reproducible scenario demonstrating this issue.
The text was updated successfully, but these errors were encountered: