systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
16 lines (15 loc) • 363 B
JavaScript
import { Button } from "./button.js";
export class Switch extends Button {
async isChecked() {
return this.byCSS("input").isSelected();
}
async isEnabled() {
return this.byCSS("input").isEnabled();
}
async isDisabled() {
return !(await this.isEnabled());
}
async toggle() {
return this.click();
}
}