Tests: Update photoviewer page model

This commit is contained in:
theresa 2023-01-25 16:56:43 +01:00
parent 33548d4054
commit b2ffa67e09

View file

@ -44,6 +44,13 @@ export default class Page {
if (action === "close") {
if (await Selector("button.pswp__button.action-" + action).visible) {
await t.click(Selector("button.pswp__button.action-" + action));
} else {
await t.wait(8000);
if (await Selector("button.pswp__button.action-" + action).visible) {
await t.click(Selector("button.pswp__button.action-" + action));
} else {
console.log("Could not close Photoviewer");
}
}
}
}