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

Page.navigate + trigger on Page.frameStoppedLoading event is not reliable #2

Open
chazkii opened this issue Jul 21, 2017 · 1 comment

Comments

@chazkii
Copy link
Owner

chazkii commented Jul 21, 2017

Reason is that the frameId changes between the ack and relevant event. This is not how I interpreted the devtools protocol docs https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-navigate

Have filed a bug with Chromium to confirm this:
https://bugs.chromium.org/p/chromium/issues/detail?id=747224

@chazkii
Copy link
Owner Author

chazkii commented Jul 24, 2017

Extended the low-level driver in 7a10b2c to allow for an input event to be the id source for the trigger event, and now the go method uses the Page.frameNavigated event as the id source. Manually tested this to work.

This approach isn't as robust as relying on the command ack payload (if it contained the correct frameId) but given that each tab has it's own context, and it is unlikely to send concurrent go commands to the tab, waiting for the first Page.frameNavigated event works as intended.

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

No branches or pull requests

1 participant