diff --git a/tests/pages/MRZScannerPage.ts b/tests/pages/MRZScannerPage.ts index 876bcb7..83b4a13 100644 --- a/tests/pages/MRZScannerPage.ts +++ b/tests/pages/MRZScannerPage.ts @@ -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() {