-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Reset WebDriver and vncRecordingContainer when Selenium container stops #5116
Reset WebDriver and vncRecordingContainer when Selenium container stops #5116
Conversation
e42b56c
to
c12e889
Compare
@kiview Would you please have a look? |
Hey @tobiasstadler, sure thing, but can you please update the description of the PR, so that we have the context? Like, which use cases does this unblock? |
@kiview I updated the description |
ping |
I am not sure I understand your example correctly. In case of using a JUnit-Rule or the Jupiter-Extension on a per-test-method basis, each test would instantiate a new |
@kiview You are right, I described the wrong case. Sorry! I changed the description to actually describe or problem. |
ping |
ping |
Hey @tobiasstadler! Thanks for spotting and fixing it. Do you think you can provide a simple test that will verify that this is no longer an issue? (so that we won't introduce a regression in the future) |
Thanks a lot for the contribution @tobiasstadler, we will take care of the test ourselves 🙂 |
Thank You! |
Some of our tests look similar to:
The selenium container is started before any test of one class are run and stopped after all test of one class are run. Currently
driver
is created only once inBrowserWebDriverContainer.java
and when the container stopsdriver.quit()
is called. So the second and any subsequent test class will see a "stopped" driver which will fail the tests of that class.Right now we recreate/start/stop the selenium container manually in
@BeforeAll
/@AfterAll
block, but it would be nice if we could reuse the container definition.