Open uifi95 opened 3 years ago
After a small investigation it seems that the selenium webhost offers a good way to gracefully stop the webdriver sessions, and it cleans up the webdriver processes as well.
We just need to send a REST DELETE
request using the session ID:
curl -X DELETE "http://{{SELENIUM_HOST}}:{{SELENIUM_PORT}}/wd/hub/session/{{SESSION_ID}}"
For now, we can simply use the default values from selenium standalone:
SELENIUM_HOST=localhost
SELENIUM_PORT=4444
When stopping selenium standalone & the clients, the webdriver processes remain hanging, and they build up especially during development with live reload.
We need a graceful shutdown, close all browsers when the program closes, and kill all webdriver processes.