Code in 'beforeGroup' and 'it' runs on different threads that causes unavailabylity to use some test frameworks (e.g. Selenide)
Currently code in 'beforeGroup' runs on the main thread, but code in 'it' after 2.0.3 version on DefaultDispatcher-worker's thread. For example this situstion causes unavailability to use Selenide framework in such scenario:
- Open url in 'before'
- Do assertions in 'it'
This happens because of binding of WebDriver when it is created to current thread(main) in 'before' and unavailability to find WebDriver in 'it' (DefaultDispatcher).
It is possible (or will be some-when) to execute code in before*, it, after* on the same thread or i need to dig in some another way? Thanks in advance!
I'm planning to use coroutines more and at the moment usages of it is internal - beforeGroup will eventually be executed via coroutines as well. I might be able to provide a way (an API) to control the dispatcher used to run the test, which will probably fix your issue.
Hi. Thanks for the answer. Yeah, such API would be great to workaround such situations.