You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the Firefox and Safari browsers are still started (even though none of the test are executed for these)
and the windows are not closed.
What needs to be done in order to run only the tests tagged with a single browser, and not create other browser windows?
The text was updated successfully, but these errors were encountered:
oscarvarto
changed the title
Running tests tagged with one browser still opens other existing browser windows
Running tests tagged with one browser still opens other browser windows
Jul 31, 2020
@oscarvarto Yes I think we'll have to change the webDriver field to def in Driver and make its subclasses (Firefox, Chrome etc.) to use lazy val for this. But unfortunately, this will be a change that will break binary compatibility so I think we can't do it in 3.2.2.x (unless @bvenners is ok with it), may be we can do it in 3.3.0.0 (planned for ScalaTest 3.3.0).
For quick workaround, Driver and its subclasses are quite simple and can be duplicated easily in your own code, e.g.:
A minimal project showing the problem is here:
https://github.com/oscarvarto/CrossBrowserTesting
Running
runs the
WikipediaSpec
on Chrome, Firefox and Safari, as expected. But, if I try to run only the Chrome test withthe Firefox and Safari browsers are still started (even though none of the test are executed for these)
and the windows are not closed.
What needs to be done in order to run only the tests tagged with a single browser, and not create other browser windows?
The text was updated successfully, but these errors were encountered: