systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
17 lines (16 loc) • 437 B
JavaScript
import { Button } from './button.js';
export class Link extends Button {
getHref() {
return this.elem.getAttribute('href');
}
getText() {
return this.elem.getText();
}
async isDisabled() {
const buttonClass = await this.byTagName('button').getAttribute('class');
return buttonClass.includes('disabled');
}
async isEnabled() {
return !(await this.isDisabled());
}
}