0

Is there a way to disable the WebAuthn-API in the ChromeDriver?

I tried to add an extension, but this did not work.

final ChromeOptions options = new ChromeOptions();
options.addArguments("--load-extension=/path/to/extension");
...

manifest.json:

{
  "name": "Disable WebAuthn",
  "version": "1.0",
  "manifest_version": 3,
  "description": "Disables Web Authentication API for testing purposes.",
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["disable_webauthn.js"],
      "run_at": "document_start"
    }
  ]
}

disable_webauthn.js:

Object.defineProperty(navigator, "credentials", {
  get: () => undefined
});```

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.