Scroll pages and elements
npx skills add https://github.com/testdriverai/testdriverai --skill testdriver:scroll
<!-- Generated from scroll.mdx. DO NOT EDIT. -->
Scroll the page or active element in any direction using mouse wheel or keyboard.
<Warning>
Focus Requirements
Scrolling requires the page or a frame to be focused. If an input field or other interactive element has focus, scroll commands may not work as expected. Before scrolling, ensure focus is on the page by:
If scroll is still not working, try using Page Down/Page Up keys directly:
await testdriver.pressKeys(['pagedown']); // Scroll down
await testdriver.pressKeys(['pageup']); // Scroll up
</Warning>
await testdriver.scroll(direction, options)
<ParamField path="direction" type="string" default="down">
Direction to scroll: 'up', 'down'
</ParamField>
<ParamField path="options" type="object">
<Expandable title="properties">
<ParamField path="amount" type="number" default="300">
Amount to scroll in pixels
</ParamField>
</Expandable>
</ParamField>
Promise<void>
// Scroll down (default)
await testdriver.scroll();
// Scroll down 5 clicks
await testdriver.scroll('down', { amount: 5 });
// Scroll up
await testdriver.scroll('up');
// Scroll up 2 clicks
await testdriver.scroll('up', { amount: 2 });
// Scroll right
await testdriver.scroll('right', { amount: 3 });
// Scroll left
await testdriver.scroll('left', { amount: 3 });
// Mouse wheel scroll (default)
await testdriver.scroll('down', { amount: 3 });
// For keyboard-based scrolling, use pressKeys instead
await testdriver.pressKeys(['pagedown']);
<Check>
Ensure page has focus before scrolling
// After typing in an input, unfocus it first
await testdriver.find('email input').click();
await testdriver.type('[email protected]');
// Click elsewhere or press Escape before scrolling
await testdriver.pressKeys(['escape']);
// Or click a non-interactive area
// await testdriver.find('page background').click();
// Now scroll will work properly
await testdriver.scroll('down');
// If scroll still doesn't work, use Page Down directly
// await testdriver.pressKeys(['pagedown']);
</Check>
<Check>
Control scroll distance with the options object
// For web pages, mouse scroll works well
await testdriver.scroll('down', { amount: 3 });
// For desktop apps or when mouse doesn't work, use keyboard
await testdriver.pressKeys(['pagedown']);
</Check>
<Warning>
Keyboard scroll uses Page Down/Up
Keyboard scrolling typically moves by one "page" at a time, which may be more than the specified click amount. It's more compatible but less precise than mouse scrolling.
</Warning>
<AccordionGroup>
<Accordion title="Infinite Scroll">
// Scroll multiple times for infinite scroll
for (let i = 0; i < 5; i++) {
await testdriver.scroll('down', { amount: 5 });
await new Promise(r => setTimeout(r, 1000)); // Wait for load
}
</Accordion>
<Accordion title="Horizontal Gallery">
// Navigate horizontal carousel
await testdriver.scroll('right', { amount: 3 });
await new Promise(r => setTimeout(r, 500));
const nextImage = await testdriver.find('next image in carousel');
await nextImage.click();
</Accordion>
</AccordionGroup>
import { beforeAll, afterAll, describe, it } from 'vitest';
import TestDriver from 'testdriverai';
describe('Scrolling', () => {
let testdriver;
beforeAll(async () => {
client = new TestDriver(process.env.TD_API_KEY);
await testdriver.auth();
await testdriver.connect();
});
afterAll(async () => {
await testdriver.disconnect();
});
it('should scroll to find elements', async () => {
await testdriver.focusApplication('Google Chrome');
// Scroll down the page
await testdriver.scroll('down', { amount: 5 });
// Click footer link
const privacyLink = await testdriver.find('Privacy Policy link');
await privacyLink.click();
await testdriver.assert('privacy policy page is displayed');
});
it('should handle infinite scroll', async () => {
await testdriver.focusApplication('Google Chrome');
// Scroll multiple times to load content
for (let i = 0; i < 3; i++) {
await testdriver.scroll('down', { amount: 5 });
await new Promise(r => setTimeout(r, 1500)); // Wait for load
}
// Verify content loaded
await testdriver.assert('more than 10 items are visible');
});
});
find() - Locate elements after scrollingpressKeys() - Use Page Down/Up keyswait() - Wait after scrollingIntegration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take testdriverai/testdriver:scroll from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.