Created
August 31, 2016 15:29
-
-
Save vitalets/f31221b68c29a8b12c28fb80b2b1dbc9 to your computer and use it in GitHub Desktop.
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
| var webdriver = require('selenium-webdriver'), | |
| By = webdriver.By, | |
| until = webdriver.until, | |
| test = require('selenium-webdriver/testing'); | |
| test.describe('Google Search (selenium compatible)', function () { | |
| var driver; | |
| test.before(function () { | |
| var capabilities = { | |
| 'browserName' : 'chrome', | |
| 'os' : 'Windows', | |
| 'os_version' : '7', | |
| 'browserstack.user': '<user>', | |
| 'browserstack.key': '<key>', | |
| 'resolution': '1024x768', | |
| }; | |
| driver = new webdriver.Builder() | |
| .usingServer('http://hub-cloud.browserstack.com/wd/hub') | |
| .withCapabilities(capabilities) | |
| .build(); | |
| }); | |
| test.it('should append query to title', function() { | |
| driver.get('http://www.google.com'); | |
| driver.findElement(By.name('q')).sendKeys('webdriver'); | |
| driver.findElement(By.name('btnG')).click(); | |
| driver.wait(until.titleContains('webdriver'), 2000); | |
| }); | |
| test.after(function () { | |
| driver.quit(); | |
| }); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment