How does one use ThreadLocal Webdriver for parallel browser execution in kotest? Somehow I believe kotlin coroutines messes this up.
Asked
Active
Viewed 166 times
1 Answers
0
As you say, ThreadLocal
doesn't always play nice with coroutines. A coroutine may resume on any thread that is owned by the CoroutineDispatcher
.
I think the proper way about it would be to add your Webdriver as a Coroutine context element. Either create your own context element or you can have a look at this, perhaps you can use that in conjunction with a listener ?

Emil Kantis
- 1,069
- 7
- 17