0

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', )
    });


 });
mr chon
  • 125
  • 1
  • 15
  • Hi, i think that's already answerd in this [Post](http://stackoverflow.com/questions/24880671/how-to-open-a-new-tab-in-casperjs) . Anyways, why you don't save the current url, then do your stuff and go back to the saved url? – dasmelch Jan 15 '16 at 08:42
  • @dasmelch Thanks , I saw all post before posting the question but I am looking for a simple solution.see the answer below. – mr chon Jan 15 '16 at 09:08

1 Answers1

1

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', )
  });


}); 
mr chon
  • 125
  • 1
  • 15