Skip to content

[🚀 Feature]: Selenium não consegue clicar em janelas abertas do google exemplo certificados e OK, de confirmação. #16528

@luaneves22-code

Description

@luaneves22-code

Description

Description

When using Selenium to automate access to secure websites (like government portals in Brazil),
the browser triggers a Windows-native certificate selection dialog.
At this point, Selenium loses control because that dialog is not part of the browser DOM
and is rendered by the Windows OS.

Currently, we must use workarounds with pywinauto, pyautogui, or AutoIt,
which are unreliable and break cross-platform compatibility.

Requested Feature

Add an API or native extension to handle Windows authentication dialogs and
certificate selection popups, at least for Chromium-based browsers (Chrome, Edge).

Why It Matters

This limitation makes Selenium unusable for:

  • Automating access to secure government websites (SEFAZ, Receita Federal, etc.)
  • Testing systems requiring smart cards or certificates.
  • Enterprise internal applications protected by Windows dialogs.

Possible Approaches

  • Integrate with Chrome DevTools Protocol to forward native dialog events.
  • Provide a pluggable "Native Dialog Handler" interface that developers can hook into.
  • Document an official workaround or library extension.

Environment

  • Selenium: 4.x
  • Browser: Chrome (latest stable)
  • OS: Windows 10/11
  • Language binding: Python

Have you considered any alternatives or workarounds?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions