-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
25 lines (18 loc) · 712 Bytes
/
test.js
File metadata and controls
25 lines (18 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let webdriver = require('selenium-webdriver')
let By = webdriver.By
let until = webdriver.until
let driver = new webdriver.Builder().forBrowser('firefox').build()
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
it("searches for web driver", () => {
return driver.then(driver => {
driver.get('http://www.google.com/ncr')
driver.findElement(By.name('q')).sendKeys('webdriver')
driver.findElement(By.name('q')).sendKeys('\n')
//driver.findElement(By.name('btnK')).click()
driver.wait(until.titleIs('webdriver - Google Search'), 2000)
return driver.getTitle().then(title => {
expect(title).toEqual("webdriver - Google Search")
})
})
})
afterAll(() => { driver.quit() })