Skip to content

Instantly share code, notes, and snippets.

@luizaguerra
Created October 27, 2017 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luizaguerra/4289e58e634cbe8ddd72ff86bd569df0 to your computer and use it in GitHub Desktop.
Save luizaguerra/4289e58e634cbe8ddd72ff86bd569df0 to your computer and use it in GitHub Desktop.
first_spec.js
describe('Protractor Demo App', function() {
beforeEach(function() {
browser.get('https://docs.angularjs.org/api');
browser.driver.manage().window().maximize();
});
it('Deve conter um título', function() {
expect(browser.getTitle()).toEqual('AngularJS: API: API Reference');
});
it('Deve acessar a diretiva ngBind', function(){
dirNgBind = element(by.linkText('ngBind'));
dirNgBind.click();
expect(browser.getTitle()).toEqual('AngularJS: API: ngBind');
});
it('Devo realizar uma busca na homepage', function(){
searchField = element(by.name('as_q'));
searchField.sendKeys('textarea');
val = element(by.linkText('textarea'));
val.click();
expect(browser.getTitle()).toEqual('AngularJS: API: textarea');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment