I have a long python application that will periodically (every 30-60 seconds) open a web page using the selenium and chrome driver, run javascript and take a screenshot. Running it on an EC2 ubuntu instance with chrome in Xvfb and for the most part everything works, except for an intermittent program. This happens on one of the following lines:
options = Options() options.add_argument("--disable-web-security") options.add_argument("--webdriver-logfile=webdrive.log") dc = DesiredCapabilities.CHROME dc['loggingPrefs'] = {'browser': 'ALL'} driver = webdriver.Chrome(chrome_options=options, desired_capabilities=dc) driver.get(url);
(I do not have the exact line, but I know from the debugging instructions that I put in that it is somewhere in the middle)
Unfortunately, the program does not crash, so it does not have error messages, it is just waiting endlessly from 7 pm last night. Running strace -p 'python program pid' returns: wait4(-1, and running strace -p 'chromedriver pid' returns recvfrom(20,
In ps axjf I see that the process is still running, it just doesn't do anything. I do not seem to understand what to do now, any suggestions?
version for chrome rib: 2.10.267518
Google Chrome 40.0.2214.111
Selenium (installed with pip): 2.42.1
#https:
---- EDIT ----
I just upgraded to ChromeDriver 2.14.313457 and Selenium 2.44.0 , hope this Selenium 2.44.0 problem. For now, I will leave it open. Thanks for the advice so far guys!
---- EDIT ----
So the service was still hanging. I am wondering if this is because for each screenshot I close and restart google-chrome? Perhaps this caused a memory leak? How can I diagnose this?
python selenium selenium-chromedriver
Trevor
source share