Skip to main content
This test opens a page, scrolls down, and asserts that the page heading is no longer visible.

Watch it run

The test

scroll.test.mjs

How it works

  • The test clicks the heading first so the page has focus and gets the scroll.
  • scroll('down', { amount: 1000 }) scrolls down with the mouse wheel. The default amount is 300.
  • The assertion adds an exception (β€œIt’s ok if it’s visible in the tab title”). This stops the AI from counting the tab title as the heading.

Run it

The test is in the TestDriver SDK repository. Clone it, install dependencies, and run the file:
The test reads your API key from TD_API_KEY. Create a key at console.testdriver.ai/team/api-keys. Then set it in your environment or a .env file.