Answer the question
In order to leave comments, you need to log in
How do I know if the browser opened by the webdriver is still open?
Let's start the browser:
from selenium.webdrive import Chrome
browser = Chrome()
browser.get('http://ya.ru')
Answer the question
In order to leave comments, you need to log in
Recognize pid. For example like this:
import os
print(os.getpid())
import os
def check_pid(pid):
""" Check For the existence of a unix pid. """
try:
os.kill(pid, 0)
except OSError:
return False
else:
return True
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question