systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
19 lines (18 loc) • 533 B
JavaScript
import { Widget } from './widget.js';
import { Browser } from "../wdio/index.js";
export class Datepicker extends Widget {
async isPresent() {
return this.getInputElement().isDisplayed();
}
async getValue() {
return this.getInputElement().getAttribute('value');
}
async setValue(value) {
await this.getInputElement().clear();
await this.getInputElement().write(value);
await Browser.pressTab();
}
getInputElement() {
return this.byTagName('input');
}
}