selenium - ChromeDriver hangs on a page with many images randomly for 20-30 minutes -


i used chromedriver automation web page interaction while, however, there random issue i'm not able resolve. hope search in community.

  • chromedriver: i've tried 2.12 - 2.16, of them has issue
  • chrome: version 43.0.2357.134 m
  • selenium: 2.44
  • java: 1.7.79 x86

symptom: when program run last page, hangs there, cost 20-30 minutes webdriver back, within time, webdriver out of control, program can nothing webdriver. , in status bar of chrome there words saying "waiting pda-ads.amazon.com"...

i don't know whether there solution resolve issue. i've tried below ways:

  1. submit callable task timeout of 10 seconds, in case still hangs on, throw exception , continue, however, @ time webdriver still hangs, cannot necessary information in last page, manually enter anther web site address make webdriver come normal

  2. maybe it's due first time load page consume long time, i'm not sure whether profile setting might use local cache better

  3. i thought of call external auto keyboard tools information in last page, don't practice yet.

would please give me thoughts or tips resolve issue or workaround?

ps: i've set timeout values this:

driver.manage().timeouts() .implicitlywait(timeout, timeunit.milliseconds) .pageloadtimeout(timeout * 3, timeunit.seconds) .setscripttimeout(timeout * 3, timeunit.seconds) 

implicitlwait timeout 10 seconds, pageload timeout , script timeout both 30 seconds, i've set these timeout values, still not works.

i think loading script (pda-ads.amazon.com...) making page not finish loading. selenium has setting page load timeout according this answer left blank waits forever page load. best bet that's case. suffered issue in project, , setting pageloadtimeout solution.

you can override value driver.manage().timeouts().pageloadtimeout(100, timeunit.seconds)

docs selenium timeouts


Comments