← ClaudeAtlas

testdriverperforming-actionslisted

Perform actions and handle dynamic, async UI so tests adapt to change
testdriverai/testdriverai · ★ 243 · Testing & QA · score 73
Install: claude install-skill testdriverai/testdriverai
<!-- Generated from performing-actions.mdx. DO NOT EDIT. --> Real apps move, load, and change. Adapt your tests to these conditions. You [generated](/generating-tests) and [learned](/caching) your tests. Then you got them to [run](/copilot/running-tests). Now the challenge is the real world: buttons show after a spinner, pages navigate, animations play, and content comes in over the network. To keep the tests reliable, do the correct actions and control the timing. Then your tests adapt to the true behavior of the UI. They do not break. ## Performing Actions TestDriver gives you many actions. You can [click](/click), [type](/type), [hover](/hover), and [scroll](/scroll). For a full list, read the [API Reference](/click). ```javascript // Clicking await testdriver.find('submit button').click(); await testdriver.find('file item').doubleClick(); await testdriver.find('text area').rightClick(); // Typing await testdriver.find('email input').type('user@example.com'); await testdriver.find('password input').type('secret', { secret: true }); // Keyboard shortcuts await testdriver.pressKeys(['enter']); await testdriver.pressKeys(['ctrl', 'c']); // Hovering await testdriver.find('dropdown menu').hover(); // Scrolling await testdriver.scroll('down', 500); // Waiting await testdriver.wait(2000); // Wait 2 seconds for animation/state change // Extracting information from screen const price = await testdriver.extract('the total price'); const orderNumber = await testdriver.extr