admin管理员组文章数量:1394403
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?
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?
Share Improve this question edited Apr 26, 2014 at 2:01 Jonathan Leffler 756k145 gold badges951 silver badges1.3k bronze badges asked Mar 15, 2013 at 16:33 Richeve BebedorRicheve Bebedor 1,6584 gold badges27 silver badges42 bronze badges1 Answer
Reset to default 7Running 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]
本文标签: javascriptWindow object in PhantomJSStack Overflow
版权声明:本文标题:javascript - Window object in PhantomJS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744087650a2588827.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论