Last active
December 21, 2017 13:50
-
-
Save giltayar/4be138a1a0c36864e283dafdee9f3a62 to your computer and use it in GitHub Desktop.
Companion code to an article
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
const webdriver = require('selenium-webdriver') | |
const {By, until} = webdriver | |
require('chromedriver') | |
describe.only('todo list', function() { | |
let driver | |
beforeAll(async () => (driver = await new webdriver.Builder().forBrowser('chrome').build())) | |
afterAll(async () => await driver.quit()) | |
it('should show the todos header', async () => { | |
await driver.get(`http://todomvc.com/examples/react`) | |
await driver.wait(until.elementLocated(By.tagName('h1'))) | |
expect(await (await driver.findElement(By.tagName('h1'))).getText()).toEqual('todos') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment