Skip to content

Instantly share code, notes, and snippets.

@MarcusFelling
Last active September 19, 2023 14:39
Show Gist options
  • Save MarcusFelling/b28e64cc083aac32311ba5721deee14f to your computer and use it in GitHub Desktop.
Save MarcusFelling/b28e64cc083aac32311ba5721deee14f to your computer and use it in GitHub Desktop.
// Use try catch block to handle the case where the consent dialog is shown for first login
try {
await dialog.waitForURL('**/Consent/**');
await dialog.getByRole('button', { name: 'Yes' }).click();
} catch (e) {
// Consent dialog was not shown
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment