The Failed Test: Debugging Automation Like a Senior · Lesson 2 of 6 · Bonus module

Reading the Traceback Like a Senior

A traceback is a story told in reverse. Find the one line that is yours, then let the exception class tell you what the app did.

By Shahriyar · Updated

Find your line first

Start at the bottom: the exception and its message. Scan up to the first frame in your repo — that is where your assumption broke. Everything else is the library doing its job.

The big three, and what each one means

▸ The message names the culprit
E   selenium.common.exceptions.ElementClickInterceptedException:
E     Message: element click intercepted: Element <button id="place-order">
E     is not clickable at point (640, 610). Other element would receive
E     the click: <div class="cookie-banner">...</div>

# The error printed the culprit. The fix is not a bigger wait —
# it is dismissing the banner, or asserting it is gone before clicking.

Framework noise

Frames from site-packages are scenery — fixtures, retry plugins and reporters add noise that means nothing. Your bug lives where your code meets the library, usually one frame.

Grounded in the Selenium and Playwright Python documentation on errors and waiting

All lessons in The Failed Test: Debugging Automation Like a Senior

  1. The Four Questions That Sort Any Failure
  2. Reading the Traceback Like a Senior
  3. Shrinking the Search Space
  4. Flaky or Broken: Prove It With a Number
  5. It Only Fails in CI
  6. The Write-Up: Product Bug or Test Bug