Created
October 27, 2017 15:32
-
-
Save luizaguerra/4289e58e634cbe8ddd72ff86bd569df0 to your computer and use it in GitHub Desktop.
first_spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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