Richeve Bebedor
Richeve Bebedor

Reputation: 1658

Window object in PhantomJS

I have seen in some documentation of PhantomJS that it can access the global "document" object but I don't know if it is also possible to access the global "window" object.

So my question is, is there a special way or I can just call the window object directly after I initialize a page using PhantomJS?

Upvotes: 2

Views: 7686

Answers (1)

Liam
Liam

Reputation: 4065

Running phantomjs from a terminal gives you an interactive session you can play around with.

If you then run console.log(window) you'll see you have access to the window object.

phantomjs> console.log(window);
[object DOMWindow]

Upvotes: 7

Related Questions