I'm having trouble working with the `evaluatePage` option
See original GitHub issue**What is the current behavior? I’m having difficulty finding a way to get the text of the scraped page.
If the current behavior is a bug, please provide the steps to reproduce not a bug – just a question.
What is the expected behavior?
being able to get the text from evaluatePage
… but I don’t see it being executed.
What is the motivation / use case for changing the behavior? n/a
Please tell us about your environment:
- Version:^1.6.0
- Platform / OS version: high sierra / v10.13.4
- Node.js version: │v9.10.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Puppeteer: page.evaluate not working after waitForNavigation ...
I run the script in debug mode ( node debug filename.js ), use sb(15) to set the breakpoint on line 15, press c...
Read more >Adding a delay before evaluating page · Issue #150 - GitHub
Currently, evaluatePage is requested right after event specified in waitUntil option ("load" by default). What is the expected behavior?
Read more >Cannot get my math operation to round - Page 2
It's in the "addOnUnload" function only right now. "Failed to evaluate page script in page Uncaught TypeError: Cannot read properties of null ( ......
Read more >Rufaydium WebDriver 1.7.2 (no selenium/websocket) - Page 9
I just want to make sure ... Driver.exe runs and creates http server, I wonder what if driver takes time to create http...
Read more >AutoML beginner's guide | Vertex AI - Google Cloud
Fortunately, machine learning is in a position to solve these problems. How does Vertex AI work? graphic representation of a simple neural network...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you need the full html you can go with this:
This will lead to the html code being saved in the “result.result.content” part of the overall “result” object, which you can use inside the onSuccess function:
You have to pass the selectors which you want to get from the HTML Document to the evaluatePage function. In the example above you are getting just the
<title>
text from the HTML Document. You could get the body or any other tag/selector just by doing the same as with the title.