-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot get DOM elements from evaluate()? #567
Comments
.evaluate(function () {
var element = document.getElementById('hplogo');
return {
src: element.src,
height: element.height
}
}); It really depends on what you're trying to accomplish, though. Why do you need the DOM element in the calling process?
That's a good question. Judging from the minified JS on google, it looks like it might be a container for attaching custom actions to the image (like a Doodle, for example) directly added to the DOM element. That's a wild guess, though.
The .then(function (_height) {
height = _height
n.end();
}) to: .then(function (_height) {
height = _height
return n.end();
}) ... and I think you'll have better luck. Returning the Nightmare |
Thank you for getting back to me so quickly! On Wed, Apr 13, 2016 at 12:33 PM Ross Hinkley [email protected]
Computing a projection stored and returned in a plain JavaScript object
Any reason I should avoid doing it that way?
|
I love using Nightmare so far, thanks for creating it 🎉
Here's a short script that illustrates my questions:
__jsaction
property?process.exit()
in the final callback, the script just hangs. Can you explain why?)Thanks!
The text was updated successfully, but these errors were encountered: