Skip to main content
SeleniumDecoded
All Chapters Chapter 8

Debugging & Best Practices

Diagnose flaky tests, capture logs and screenshots, and decode the common exceptions

  1. 1

    Debugging Tips

    Essential techniques for debugging Selenium tests, identifying failures, and fixing flaky tests.

    Selenium 3 & 4 Stable
  2. 2

    Screenshots and Videos

    Capture screenshots and record videos during test execution for debugging and reporting.

    Selenium 3 & 4 Stable
  3. 3

    Common Errors

    Diagnose and fix the most common Selenium errors and exceptions.

    Selenium 3 & 4 Stable
  4. 4

    Flaky Tests: Diagnosis and Cure

    A systematic method for finding why a test passes sometimes: classify the failure, reproduce it deliberately, fix the root cause (timing, state, order, environment, product), and quarantine without hiding.

    Selenium 4 Stable
  5. 5

    Browser and Driver Logs

    Turn on the logs that explain failures: browser console output via BiDi, chromedriver and geckodriver logs, Selenium's own client logging, network failures, and how to collect them per test.

    Selenium 4 Stable