3

I’m running Selenium automation tests on macOS using Google Chrome, and I keep getting the OS-level popup:

“Use a saved passkey from iCloud Keychain”

This popup blocks the UI and causes my tests to fail. Since it’s a macOS system dialog, Selenium is unable to interact with or dismiss it.

What I’ve tried

ChromeOptions:

options.addArguments("--disable-webauthn");
options.addArguments("--disable-features=WebAuthentication,WebAuthnExtensions,WebAuthenticationUI");
options.addArguments("--disable-web-security");
options.addArguments("--incognito");

Chrome settings:

  • Disabled password saving
  • Disabled auto sign-in
  • Disabled passkeys (where available)

Chrome flags:

  • Disabled Web Authentication API
  • Disabled Passkey-related flags

Despite this, the popup still appears for sites like Amazon / Flipkart.

Environment:

  • macOS (Apple Silicon)
  • Chrome (latest stable)
  • Selenium + Java
  • ChromeDriver

Problem:
Since the popup is triggered by macOS iCloud Keychain, Selenium cannot detect or handle it. I’m looking for a reliable way to block or prevent this popup during automation, preferably without manual interaction.

1 Answer 1

2

To disable macOS Keychain/Passkey popups with in using you need to stop iCloud Keychain sync from the System Settings using the steps below.

Turning Off iCloud Keychain Sync

This stops passwords syncing to iCloud, so they aren't prompted across devices.

  • Open System Settings on your Mac (Apple Logo > System Settings).
  • In the left side bar, click on General.
  • Select Autofill & Passwords.
  • Authenticate using Touch ID or Mac password.
  • Toggle off the Autofill Password & Passkeys.

Turning off the option Autofill Password & Passkeys you will be no longer asked for verification codes to sign-in.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.