Skip to content

Instantly share code, notes, and snippets.

@serhatbolsu
Created August 12, 2020 08:37
Show Gist options
  • Save serhatbolsu/f23ba2a61930e06595070758e8bb7198 to your computer and use it in GitHub Desktop.
Save serhatbolsu/f23ba2a61930e06595070758e8bb7198 to your computer and use it in GitHub Desktop.
WebdriverIO-ui-test-automation-textInput.page.js
import Page from './page';
class TextInput extends Page {
get nameField() {return $('#newButtonName');}
get button() {return $('#updatingButton');}
open() {
super.open('textinput');
return this;
}
updateButtonText(text) {
this.nameField.setValue(text);
this.button.click();
return this;
}
getButtonText() {
return this.button.getText();
}
}
export default new TextInput();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment