简体   繁体   中英

how to load another page in casperjs?

I am testing website and then I come across a link I want to open and continue testing the second web page

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


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


 });

I found a very simple solution at Casperjs documentation page 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', )
  });


}); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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