Skip to content

Instantly share code, notes, and snippets.

View rickschubert's full-sized avatar

Rick Schubert rickschubert

View GitHub Profile
@rickschubert
rickschubert / awaitPoP.js
Last active October 20, 2018 17:30
Page Object Await Pattern
// Login.page.js
import Dashboard from "./pages/Dashboard.page.js"
class LoginPage {
constructor() {
this.awaitFullLoad()
}
get username() { return '#username' }
get password() { return '#password' }
@rickschubert
rickschubert / standardPoP.js
Last active October 20, 2018 17:30
Standard page object pattern
// Login.page.js
class LoginPage {
get username() { return '#username' }
get password() { return '#password' }
get submit() { return '#login' }
login() {
browser.setValue(this.username, "R2D2")
browser.setValue(this.password, "c3po")
browser.click(this.submit)