Files
IGP-Fan-Reference/Playwright/shared/websiteSearchDialog.js
T
2026-05-31 14:33:58 -04:00

26 lines
650 B
JavaScript

class WebsiteSearchDialog {
constructor(website) {
this.website = website;
}
get searchBackground() { return this.website.find('searchBackground'); }
get searchInput() { return this.website.find('searchInput'); }
async closeDialog() {
await this.website.clickSearchBackground();
return this.website.navigationBar;
}
async search(text) {
await this.website.enterInput(this.searchInput, text);
return this;
}
async selectSearchEntity(label) {
await this.website.clickElement(this.website.findButtonWithLabel(label));
return this.website.databaseSinglePage;
}
}
module.exports = WebsiteSearchDialog;