UNPKG

systelab-components-wdio-test

Version:
28 lines (27 loc) 757 B
import { Widget } from "./widget.js"; import { Browser } from '../wdio/browser.js'; export class Spinner extends Widget { async clear() { return this.byTagName('input').clear(); } async setText(text) { return this.byTagName('input').write(text); } async getText() { return this.byTagName('input').getValue(); } async getValue() { return +(await this.getText()); } async setValue(value) { await this.clear(); await this.setText(value.toString()); await Browser.pressTab(); } async increase() { return this.byClassName('input-group-append').click(); } async decrease() { return this.byClassName('input-group-prepend').click(); } }