Skip to content

Instantly share code, notes, and snippets.

@marlun
Created December 13, 2016 20:33
Show Gist options
  • Save marlun/8460a9b32da46b0f1fc83f32f29f816b to your computer and use it in GitHub Desktop.
Save marlun/8460a9b32da46b0f1fc83f32f29f816b to your computer and use it in GitHub Desktop.
Working example of selenium-webdriver and tape (I think)
test.only('Show error on missing credentials', function (t) {
t.plan(1);
browser.get('http://localhost:3000/');
browser.findElement({ className: 'login__submit' })
.click();
var error = browser.wait(Until.elementLocated({ className: 'login__error' }));
browser.wait(Until.elementIsVisible(error))
.then(function () {
t.ok(true);
});
browser.quit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment