-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webdriver.executeScript wait a long time(26s) before page load #2
Comments
@zixia Use the following option |
@bastrich Thanks for the information! However, I can not found There's nothing outputed by the following commands: 01:38:19 (master) ~/git/wechaty/node_modules/selenium-webdriver$ grep setCapability * -R
01:38:55 (master) ~/git/wechaty/node_modules/selenium-webdriver$ grep CapabilityType * -R After a search on selenium repository at here: https://github.com/SeleniumHQ/selenium/search?utf8=%E2%9C%93&q=PAGE_LOAD_STRATEGY , I also did not found any more information about it. Could you confirm it works with nodejs and chrome? If so, can you post a runnable nodejs code for it? Thanks! |
This issue should be fixed at v0.10 or above. |
It seems that webdriver always wait browser window to be stable before run
executeScript
.the condition of stable is set to be like this:
But...
If we have a ajax call / http long pulling / etc, the
readyState
will beinteractive
for a long time.Solution(?)
make webdrive wait only for readyState is
loading
See Also
executeScript
before page load by WebDriver in selenium? https://stackoverflow.com/questions/37071807/how-to-executescript-before-page-load-by-webdriver-in-seleniumresourceTimeout
PhantomJS Log
When waiting, it output lots of logs like this:
PhantomJS Code
Do not know what SIGNAL is, what SLOT is...
https://github.com/ariya/phantomjs/blob/096d0da87ee6d94f3eed84446c0eb5176566d54a/src/webpage.cpp#L396
GhostDriver Code
https://github.com/detro/ghostdriver/blob/f976007a431e634a3ca981eea743a2686ebed38e/src/session.js#L233
maybe change
_isLoading()
to this?The text was updated successfully, but these errors were encountered: