The SDET Playbook

← All questions

How do I automate file uploads, downloads, pop-ups and CAPTCHA in web tests?

Asked Sep 28, 2026Viewed 0 times

1 Answer

Sign in to answer and to vote.

  • 0
    The SDET PlaybookSep 28, 2026

    Uploads and JavaScript dialogs are supported directly by both tools. For downloads, Selenium's docs say the API does not expose download progress, so find the link, pass its URL and cookies to an HTTP library, and check the file there; Playwright has a dedicated downloads API. For CAPTCHA, Selenium's guidance is blunt: it is designed to stop automation, so disable it in the test environment or add a test-only bypass hook. Two-factor authentication follows the same rule: disable it for test users or the test environment, or have the team create a test-only token, rather than automating a phone.

    Sources: Selenium on file downloads, Selenium on CAPTCHAs, Selenium on two-factor authentication, Playwright downloads