Guest User

CasperJS-GorillaLogic

a guest
Oct 17th, 2017
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. casper.test.begin('Casperjs web page automated by Gorilla Logic ', function suite(test) {
  2.     casper.start("http://docs.casperjs.org/en/latest/", function() {
  3.  
  4.         this.waitForSelector('#searchbox');
  5.         // test.assertTitle("Google", "google homepage title is the one expected");
  6.         this.sendKeys('#searchbox > form > div:nth-child(2) > input[type="submit"]', 'credits');
  7.         this.click('#searchbox');
  8.     });
  9.  
  10.  
  11.     casper.then(function() {
  12.         test.assertTitle(this.getTitle(), "Title is displayed correctly");
  13.     });
  14.     //Test execution
  15.     casper.run(function() {
  16.         this.log('Test finishing', 'info');
  17.         test.done();
  18.     });
  19. });
Advertisement
Add Comment
Please, Sign In to add comment