Skip to content
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

Adding support for a noWaitLoadEvent config option #944

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mnemolyst
Copy link

Adding support for a gotoOptions config option, to be passed to Chromy, primarily for setting waitLoadEvent:false

…y, primarily for setting waitLoadEvent:false
@garris
Copy link
Owner

garris commented Dec 12, 2018

Thanks for the PR. What's the use case for this one?

@mnemolyst
Copy link
Author

Hi -
Some websites hang on loading and never fire their "load" event, so chromy.goto() blocks until the script times out. Setting {"waitLoadEvent": false} in goto() prevents it from blocking.
Now that I think about it, given the multiple options Backstop provides for delaying screenshots, it might be okay to set waitLoadEvent: false by default.

@garris
Copy link
Owner

garris commented Dec 12, 2018

That sounds like a pretty big deal -- the load event not firing etc...

Are you not in a position to stabilize that?

@mnemolyst
Copy link
Author

No, it's a Mindtouch site that I am only providing styling for, but have no access to content, backend, etc. There is one cross-origin asset load that hangs and prevents the site from finishing.

@mnemolyst mnemolyst changed the title Adding support for a gotoOptions config option Adding support for a noWaitLoadEvent config option Dec 12, 2018
@garris
Copy link
Owner

garris commented Dec 12, 2018

Does this issue happen using puppeteer engine?

@mnemolyst
Copy link
Author

It appears so. With Puppeteer I get the following:

Puppeteer encountered an error while running scenario "..."
TimeoutError: Navigation Timeout Exceeded: 30000ms exceeded

It's running headless so I can't see just what it's doing, but I believe it's the same error.
If I point it to another url, eventually I see in the console "Browser Console Log 0: JSHandle:BackstopTools have been installed.", which is generated by runPuppet.js on the line after "await page.goto()"
But running against the page that never emits the "load" event, I never see that line in the console.

@mnemolyst
Copy link
Author

It does succeed with puppeteer if I add { waitUntil: 'networkidle2' } to the page.goto() call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants