I am trying to get html of newly open window after activating a link that uses javascript by zombie.js.
Here is the html code
<html> <head> <script type="text/javascript"> function newin(id) { var url="page.php?id="+id; window.open(url,id,"toolbar=no,location=top,directories=no,status=no,scrollbars=yes,hscroll=no,resizable=yes,copyhistory=no,width=1025,height=1250"); } </script> </head> <body> <div> <a href="javascript:newin(123)">123</a><br/> <a href="javascript:newin(234)">234</a><br/> <a href="javascript:newin(345)">345</a><br/> </div> </body>
The Script I am using is:
</html>var Browser = require("zombie"); var browser = new Browser(); browser.visit("http://localhost:8000/testpage.html", function () { browser.wait(function(){ var selector = "a[href*='newin']"; var elements = browser.queryAll(selector); for (var e=0;e<elements.length;e++){ browser.clickLink(elements[e],function(){ browser.wait(function(){ console.log(browser.html()); }); }); } }); });
I am not able to get HTML of any window.Any ideas what is wrong in this code ?
--
You received this message because you are subscribed to the Google Groups "zombie.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zombie-js+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.