-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Evaluate returns undefined but chromium correctly has value inside evaluate #2418
Comments
If I get this right, DevTools protocol cannot serialize an array of nodes and resolves it to return nodes.map(({ innerText }) => innerText) |
|
How about throwing an error when evaluate returns a non-Serializable value? cc @aslushnikov |
Got it @vsemozhetbyt. I would concur on adding a error when the value being returned is not serializable. |
@yanivefraim @chrisabrams we were there at one moment, but had to change to await page.evaluate(() => window.saveValue = document.body); We consider returning a special value in this case instead to emphasize the difference. |
@aslushnikov I see what you're saying. In my case, I need to know the |
@chrisabrams why don't you use the |
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
You can run this gist here: https://gist.github.com/chrisabrams/a2a098d1b2d697f349f4e1ad1be98602
What is the expected result?
The expected result is that evaluate will return the list of nodes
What happens instead?
Instead, evaluate returns
undefined
The text was updated successfully, but these errors were encountered: