繁体   English   中英

如何在casperjs中加载另一个页面?

[英]how to load another page in casperjs?

我正在测试网站,然后遇到一个我想打开的链接,然后继续测试第二个网页

 casper.start('http://Firstsite.com', function() {
 //blablah my codeing 


    casper.start('http://Secondesite.com', function() { 
   //blablah my codeing for ('http://Secondesite.com', )
    });


 });

我在Casperjs文档页面http://docs.casperjs.org/en/latest/modules/casper.html#中找到了一个非常简单的解决方案

 casper.start('http://Firstsite.com', function() {
 //blablah my codeing 


  casper.thenOpen('http://Secondesite.com', function() { 
     //blablah my codeing for ('http://Secondesite.com', )
  });


}); 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM