Skip to content

Commit

Permalink
test: trying to add some more error handling for clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
rH4rtinger committed Sep 20, 2024
1 parent 8260832 commit f94cc9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/e2e/webview/WebviewTestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,13 @@ export class WebviewTestUtils {
await databaseName.sendKeys(config.databaseName, Key.TAB);

const button = await webView.findWebElement(By.id(config.buttonToClick));
assert.deepStrictEqual(await button.getAttribute("id"), config.buttonToClick, "button id");

if (await button.isEnabled()) {
try {
await button.click();
} catch {
await webView.switchToFrame(1000);
await webView.getDriver().executeScript("arguments[0].click();", button);
}
});

Expand Down

0 comments on commit f94cc9d

Please sign in to comment.