Watch it run
The test
click-button.test.mjs
How it works
- The
find()description gives the button’s label, look, and position (“black button below the password field”). click()clicks the returned element. It throws iffind()didn’t locate it.assert()describes the error in plain language, so the test doesn’t depend on exact wording or markup.
Run it
The test is in the TestDriver SDK repository. Clone it, install dependencies, and run the file:TD_API_KEY. Create a key at console.testdriver.ai/team/api-keys. Then set it in your environment or a .env file.

