-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
bugUh oh... Something needs to be fixedUh oh... Something needs to be fixedworkaround existsYou can reach your destination if you do this...You can reach your destination if you do this...
Description
When using the --xvfb option on a Linux environment (without desktop), the option --reuse-session has no effet, and the Chrome browser is re-launched on each tests.
More context:
We're using Pytest/SeleniumBase on a Jenkins environment to run our tests.
Jenkins is running on a Linux OS, without desktop, so we are using the --xvfb option, in addition to the --reuse-session to faster our tests.
We have confirmed that the PID of the Chrome browser is updated between tests, indicating that the Chrome browser instance is restarted.
Steps to reproduce
- Write two different tests on a same class:
- Test 1 is opening a specific URL
- Test 2 is asserting this specific URL (which can only work if --reuse-session is enabled)
- Execute the test (on the specified environment) with the option --xvfb + --reuse-session
Expected behavior
- Test 2 must pass, as the Chrome is expected to be reused between Test 1 and Test 2
Actual behavior
- Test 2 is failing, as the reuse-session is affected by the XVFB option (Chrome browser is relaunched)
Workaround
- Replace the --xvfb option with --headless
Metadata
Metadata
Assignees
Labels
bugUh oh... Something needs to be fixedUh oh... Something needs to be fixedworkaround existsYou can reach your destination if you do this...You can reach your destination if you do this...