systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
25 lines (24 loc) • 795 B
JavaScript
import { Button } from './button.js';
import { MessagePopup } from './message-popup.js';
import { Widget } from './widget.js';
export class Dialog extends Widget {
async getNumberOfButtons() {
return this.byTagName('systelab-dialog-bottom').allByTagName('button').count();
}
async getTitle() {
return this.byTagName('systelab-dialog-header').byClassName('slab-dialog-header').getText();
}
getButtonClose() {
return new Button(this.byCSS('.slab-dialog-close'));
}
async close() {
await this.getButtonClose().waitUntilClickable();
await this.getButtonClose().click();
}
getButtonByName(name) {
return new Button(this.byButtonText('name'));
}
getMessagePopup() {
return new MessagePopup();
}
}