UNPKG

systelab-components-wdio-test

Version:
25 lines (24 loc) 795 B
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(); } }