Created
September 25, 2019 20:31
-
-
Save alfredlucero/60457f069d898c20ebba7be5b09fd2d1 to your computer and use it in GitHub Desktop.
WDIO Specific Page Object - STUI to Webdriver SG Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Page from './page'; | |
class SomePage extends Page { | |
get submitButton() { | |
return $("button[data-testid=submit]"); | |
} | |
get tableRows() { | |
return $$("tbody > tr[data-testid=tableRow]"); | |
} | |
// More getter selectors on the page | |
open() { | |
super.open("/some_page"); | |
} | |
// Other helper functions that use the selectors above to interact with the page | |
// In the functions you can do things like this.submitButton.click(); | |
} | |
export default new SomePage(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment