Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const webdriver = require('selenium-webdriver')
const {By, until} = webdriver
const {Eyes} = require('eyes.selenium')
describe.only('todo list', function() {
let driver
beforeAll(async () => (driver = await new webdriver.Builder().forBrowser('chrome').build()))
let eyes
beforeAll(async () => {
eyes = new Eyes()
await, 'todo list', 'todo list', {width: 800, height: 600})
afterAll(async () => await eyes.close())
afterAll(async () => await driver.quit())
it('should show the todos header', async () => {
await driver.get(``)
await driver.wait(until.elementLocated(By.tagName('h1')))
await eyes.checkWindow('Home page with no todos')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment