I want to control whether my WebDriver
quit but I can\'t find a method for that. (It seems that in Java there\'s a way to do it)
from selenium impor
suggested methods above didn't work for me on selenium version 3.141.0
dir(driver.service) found a few useful options
driver.session_id
driver.service.process
driver.service.assert_process_still_running()
driver.service.assert_process_still_running
I found this SO question when I had a problem with closing an already closed driver, in my case a try catch around the driver.close() worked for my purposes.
try:
driver.close()
print("driver successfully closed.")
except Exception as e:
print("driver already closed.")
also:
import selenium
help(selenium)
to check selenium version number