winek

Jasmine + selenium-webdriver

Jan 10th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jasmine.getEnv().defaultTimeoutInterval = 10000;
  2.  
  3. var webdriver = require('selenium-webdriver'),
  4.   driver = new webdriver.Builder().
  5.   withCapabilities(webdriver.Capabilities.firefox()).
  6.   build();
  7.  
  8. describe('startpage', function() {
  9.   driver.get('http://localhost/');
  10.  
  11.   it('should have application name in title', function(done) {
  12.     driver.getTitle()
  13.     .then(function(title) {
  14.       expect(title.indexOf('MyApp™')).not.toBe(-1);
  15.       done();
  16.     });
  17.   });
  18.  
  19.   runs(function() {
  20.     driver.quit();
  21.   });
  22. });
Advertisement
Add Comment
Please, Sign In to add comment