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.select throwing error when select change page #4537

Closed
gilles-yvetot opened this issue Jun 6, 2019 · 0 comments · Fixed by #4539
Closed

Page.select throwing error when select change page #4537

gilles-yvetot opened this issue Jun 6, 2019 · 0 comments · Fixed by #4539

Comments

@gilles-yvetot
Copy link

Steps to reproduce

What steps will reproduce the problem?

page.select('#language','fr')

What is the expected result?

  1. Go to the MDN url indicated
  2. scroll to the bottom of the page
  3. change the language in the dropdown
  4. it will redirect you to the MDN homepage of the chosen language

What happens instead?

It does this but throw an error at the same time. The issue seems to be that the select is triggering a page load and we are loosing the reference to the specified DOM element.

aslushnikov added a commit to aslushnikov/puppeteer that referenced this issue Jun 7, 2019
This patch teaches page.evaluate to do 1 hop instead of 2 hops.
As a result, things such as `page.select` will not throw an
unfortunate exception when they schedule a navigation.

Fix puppeteer#4537
aslushnikov added a commit that referenced this issue Jun 7, 2019
This patch teaches page.evaluate to do 1 hop instead of 2 hops.
As a result, things such as `page.select` will not throw an
unfortunate exception when they schedule a navigation.

Fix #4537
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 a pull request may close this issue.

1 participant