'What does Selenium Service class do?
I'm curious what the Selenium class called "Service" is.
Would this be useful for setting up a Chrome driver as opposed to invoking a webdriver through my_driver = webdriver.Chrome(...)?
I looked up the docs but they're not helpful in describing the purpose:
Solution 1:[1]
This service is introduce to manage the driver process. So that you can kill it after your tests are done.
Basically invoking quit does not put any obligations to webdriver to stop existing as the process. On the contrary webdriver is a service that is aimed to process concurrent sessions from different clients. So once your tests are stopped the webdriver might still be running.
When you start your tests using Service you now get an interface to kill that remote process using the obtained reference.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alexey R. |
