Created
March 31, 2018 16:15
-
-
Save andreidbr/ae4417244b3c31a2af4c0c650035a223 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
const {webdriver, Builder, By, Key, until} = require('selenium-webdriver'), | |
test = require('selenium-webdriver/testing'), | |
assert = require('assert'); | |
test.describe('PortfolioTestsAsyncAwait', function() { | |
test.before(async function () { | |
driver = await new Builder().forBrowser('chrome').build(); | |
}); | |
test.it('01 Drums Access Await', async function () { | |
await driver.get("https://andreidbr.github.io/JS30/"); | |
const drumsLink = await driver.findElement(By.xpath('/html/body/div[2]/div[1]')); | |
await drumsLink.click(); | |
const pageTitle = await driver.getTitle(); | |
await assert.equal(pageTitle, "JS30: 01 Drums"); | |
} | |
) | |
test.after(async function() { await driver.quit()}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment