Is Selenium WebDriver thread safe?

前端 未结 1 1712
一个人的身影
一个人的身影 2020-12-06 14:51

More specifically, is it safe to perform multiple operations on a single WebDriver/WebElement simultaneously? i.e. something like this

WebDriver driver; //d         


        
相关标签:
1条回答
  • 2020-12-06 14:53

    This question is answered here

    "WebDriver is not thread-safe. Having said that, if you can serialize access to the underlying driver instance, you can share a reference in more than one thread. This is not advisable. You /can/ on the other hand instantiate one WebDriver instance for each thread. "

    0 讨论(0)
提交回复
热议问题