page.evaluate problem
See original GitHub issueIn official documentation api we can see:
var title = page.evaluate(function(s) { return document.querySelector(s).innerText; }, 'title');
http://phantomjs.org/api/webpage/method/evaluate.html
- This code is not working here. Function .evaluate requires callback when we write argument ‘title’.
- And page.evaluate always return undefined.
Can you fix this?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Puppeteer page.evaluate not working as expected
I have a console log before I run page.evaluate() which logs what I expect, but the console log inside page.evaluate never runs. const...
Read more >Console.log() from page.evaluate() not working #1944 - GitHub
Hello, I'm trying to console.log() in a page.evaluate() function and it's not working... Any solutions ? Thank you !
Read more >Page.evaluate() method - Puppeteer
Page.evaluate() method. Evaluates a function in the page's context and returns the result. If the function passed to page.evaluateHandle returns a Promise, ...
Read more >Variable not defined with page.evaluate in Puppeteer - YouTube
... this when you hit this error : "Variable not defined with page. evaluate in Puppeteer" "How to pass variable into Puppeteer page....
Read more >puppeteer.Page.evaluate JavaScript and Node.js ... - Tabnine
Show more. Evaluates a function in the browser context. If the function, passed to the frame. evaluate, returns a Promise, then frame.
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
Works as intended. See https://github.com/baudehlo/node-phantom-simple#usage start & known issues in readme.
That’s a low-level driver, not framework. It does only [most of] things allowed by phantom, with same [very similar] signatures. Additional sugar should be implemented outside.