Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rodrigojmartin/77aec8628b054f529d79f5c5c351053b to your computer and use it in GitHub Desktop.
Save rodrigojmartin/77aec8628b054f529d79f5c5c351053b to your computer and use it in GitHub Desktop.
// pages/homepage.js
const { By } = require('selenium-webdriver');
class HomePage {
constructor(driver) {
this.driver = driver;
}
async open(url) {
await this.driver.get(url);
}
async clickLoginButton() {
const loginButton = await this.driver.findElement(By.id('login'));
await loginButton.click();
}
}
module.exports = HomePage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment