-
Notifications
You must be signed in to change notification settings - Fork 34
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
Undefined result when retrieving the document object #28
Comments
@obihill can you check something? Does the document.title exist before in your first evaluate function block? |
Hi Borna, I tried to see how to get things to work, but did not succeed. I also didn't receive any response here so I gave up on JqueryGo and instead tried to see how else to use JQuery with PhantomJS. I was able to find a solution. Below is a template you can use.
Save your code in a
Note: The url you provide should not include When using this approach, I have full access to Try this out and see if it works for you. |
I appreciate your input @obihill . I will say that the jQuery interface is an abstraction of the actual jQuery features and instead of returning a DOM object (which would require a JavaScript DOM engine like jsdom), it returns a reference ID that is then used to identify that DOM object when operations are performed from within node.js. If you want an actual DOM object, then that may be harder to do within NodeJS without using JSDOM or the like, which would not be PhantomJS. |
I'm having a bit of trouble accessing the
document
object.When I run the code below:
I get
undefined
as the result, instead of the page title.However, the following using phantomjs:
I get the proper result.
Any idea why this is happening?
The text was updated successfully, but these errors were encountered: