CONSOLE5 MIN READ

Catch the error that only fires on a click

Find the error that a page load check never sees because it only happens when the user acts.

The problem

The page loads clean. The console is empty. Every load time check passes. Then the user clicks Add to cart, or opens the date picker, or submits the form, and an error fires, a missing handler, a bad state update, a null on a value that only exists after interaction. Load time tests never touch the button, so they never see it. The user finds it on the first click.

The idea

Most checks photograph the page at rest. This one acts first, the way a user does, then listens for what broke.

What you will catch

  • An error that only fires after a click or a form submit
  • A broken handler or a bad state update after interaction
  • The bug a load time check structurally cannot reach

How it works

Console capture is per step, so you do the interaction and then assert on the console in the same step. Errors that fire as a result of the click land in that step capture.

Run it now

kane-cli --tui
# then paste this objective:
Go to https://www.scrapingcourse.com/ecommerce/, open a product and click Add to Cart.
Assert: there are no console errors after the click.

Or one line, for CI or sharing

kane-cli run "Go to https://www.scrapingcourse.com/ecommerce/, open a product and click Add to Cart.
Assert: there are no console errors after the click." --agent

What prints

Example run. Your numbers will vary by site, build and run. The PASS / FAIL and the zeros are the stable result, the raw timings and counts are illustrative.

▶ open product + click Add to Cart              ok
▶ assert no console errors      0 errors        ✓ PASS

RESULT  PASS   exit 0   ~1m 30s   ~15 to 25 credits

Adapt it to your app

Go to <your page> and <perform the interaction>.
Assert: there are no console errors after <the action>.

Why it works

Because console resets each step, asserting in the same step as the interaction scopes the check to errors the interaction caused, not noise from the initial load.

What it unlocks

Interaction bugs get caught before the user does. Chain a few interactions, each with its own console check, and you cover the actions a load time test will always miss.

More Use Cases

CONSOLE

Catch the bug a screenshot misses

Your visual test is green and the page still loaded broken. This catches the server error and the thrown error the camera cannot see.

PERFORMANCE

X-ray any page

Point Kane CLI at any URL and get back every number your DevTools would show you, in one structured result.

COOKIES

See the cookie your test scripts are blind to

Assert an HttpOnly session cookie exists, the secure cookie that document.cookie and most test tools cannot read.

NETWORK

Check the response, not just the status

Assert the endpoint returned the right shape, an array with items or a field with a value, not merely a 200.

NETWORK

Catch the API failure behind a green page

Assert the real network result, a 200 where it matters and no 5xx anywhere, even when the page looks perfect.

COOKIES

Catch a cookie missing the Secure flag

Fail the moment any cookie is set without the Secure flag, so a session token can never travel over plain HTTP.

NETWORK

Catch an environment leak before it ships

Fail a production build that quietly calls staging, localhost or a debug endpoint.

LOCAL STORAGE

Keep secrets out of local storage

Assert that no obviously sensitive value, a password, a card number, raw personal data, is sitting in storage any script could read.

GENERATE

Describe what to test, get the test cases

Say what you want to test in one sentence and Kane CLI generates the scenarios and the Positive, Negative and Edge cases, no browser, no writing them by hand.

GENERATE

Reuse what you already have with memory

Turn on the memory layer and generation reuses your relevant existing cases and avoids drafting duplicates of coverage you already wrote.

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests