Skip to content

Commit

Permalink
Fix EU cookie consent banner selector (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnaras authored Mar 18, 2024
1 parent bdbe6c5 commit 82787f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Fix EU cookie consent banner selector",
"packageName": "@itwin/oidc-signin-tool",
"email": "[email protected]",
"dependentChangeType": "patch"
}
5 changes: 1 addition & 4 deletions packages/oidc-signin-tool/src/SignInAutomation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,7 @@ async function handleConsentPage<T>(context: AutomatedSignInContext<T>): Promise
);

// In EU there is a cookie consent banner covering the accept button, and it must be dismissed first
const cookieAcceptButton = await page.waitForSelector(
"#onetrust-accept-btn-handler",
{ timeout: 1000 }
);
const cookieAcceptButton = page.locator("#onetrust-accept-btn-handler");

if (await cookieAcceptButton.isVisible()) {
await cookieAcceptButton.click();
Expand Down

0 comments on commit 82787f3

Please sign in to comment.