Created
September 1, 2016 19:46
-
-
Save Xotabu4/dcfe83bc98ad304f58f3b05de9cd6c69 to your computer and use it in GitHub Desktop.
Own TypeScript example for simple google test with protractor JS
This file contains hidden or 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
| import {browser, element, by, ExpectedConditions as EC} from 'protractor/globals' | |
| describe('google', function () { | |
| beforeEach(function () { | |
| browser.get('/'); | |
| }); | |
| it('should show correct title after search', function () { | |
| expect(browser.getTitle()).toEqual('Google', 'The page title should be equal "Google" after open'); | |
| let searchField = element(by.name('q')); | |
| searchField.sendKeys('Test!'); | |
| searchField.submit(); | |
| browser.wait(EC.titleContains('Test!'), 10000, 'The page title should start with the searched string after the search.'); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment