I am new to selenium, I'm facing "Time out receiving message from the renderer" in chrome browser while running test with selenium 2.41 and chrome 2.9x. I have tried many tests to reproduce the issue, but it occurs inconsistently. Is there any specific reasons for this issue?.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Thanks for your responses finally I solved it cutting out some plugins and blocked some third party ads before starting the tests.
Solution 1: There are some plugins like flash player which may hangs the browser inconsistently waiting for some resource during test run, try disabling such plugins while starting the test using the chrome switches. http://peter.sh/experiments/chromium-command-line-switches/
Solution 2: The browser might hang waiting for some third party ads. Try disabling ads using some ad blocker extension or block the url pattern using the custom proxy configuration.
For inconsistent browser hangs, Try to find which process hangs the browser. 1.Unlike firefox chrome creates separate process for browser, tab, extension and plugins. 2.When the browser hangs check is there any new process(shift+Esc) like Web Worker:blob appended with an third party url, then follow #2 3.or else if there are more separate process opened for plugins try #1
It looks like this issue has been logged as a bug for Selenium but has not yet been fixed: Issue 402: webdriver hangs on page load and does not give control back for script execution
They are looking for a specific repro, maybe you could help them out by posting your specific repro?
One person reported that removing any driver timeout options from their code solved the problem:
driver.manage().timeouts().implicitlyWait(2000, TimeUnit.MILLISECONDS); driver.manage().timeouts().pageLoadTimeout(40, TimeUnit.SECONDS);
in my code, above 2 lines used and I comment the second line my application is working fine.
I'll share my case:
I had this issue with my Django selenium tests (django==1.7.12 and selenium==2.53.1) with ChromeDriver 2.21.371459 and Google Chrome 48.0.2564.116.
I was able to isolate the issue. In my case it was happening only for pages referencing a static file (an image in a HTML tag for instance http://cdn.local.myproject.net/static/myimage.png) on my custom local cdn domain. The issue was not present if I used a relative path "/static/myimage.png" or localhost "http://127.0.0.1/static/myimage.png so I figured it was a DNS problem.
I was able to bypass the problem by using the
Example in Python:
I don't know if this is the general case but hopefully it can help some of you.