Skip to content

Commit

Permalink
Do not fail the test if the license warning dialog does not display, …
Browse files Browse the repository at this point in the history
…just print an error log
  • Loading branch information
eugene-dynamsoft committed Sep 19, 2024
1 parent 49a1739 commit 3f10767
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/pages/MRZScannerPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ export class MRZScannerPage {
* Close the license related dialog if it shows.
*/
async closeDialogIfPresent() {
this.dialogCloseButton.waitFor({ state: "visible", timeout: 5000 });
await this.dialogCloseButton.click();

try {
this.dialogCloseButton.waitFor({ state: "visible", timeout: 5000 });
await this.dialogCloseButton.click();
} catch (error) {
console.log("Failed to close the dialog: ", error);
}
}

async navigateTo() {
Expand Down

0 comments on commit 3f10767

Please sign in to comment.