Skip to content

Instantly share code, notes, and snippets.

@andreidbr
Created March 31, 2018 16:15
Show Gist options
  • Save andreidbr/ae4417244b3c31a2af4c0c650035a223 to your computer and use it in GitHub Desktop.
Save andreidbr/ae4417244b3c31a2af4c0c650035a223 to your computer and use it in GitHub Desktop.
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