Skip to content
Back to skills

Testdriver:Locating Elements

ASecurity

Find UI elements using natural language descriptions

  • 243 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 6, 2026
ai-agentsjavascriptjavadebuggingperformance

Works with

  • cli

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add testdriverai/testdriverai --skill testdriver:locating-elements --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testdriver:Locating Elements?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Testdriver:Locating Elements
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/testdriverai-testdriver-locating-elements-testdriverai/badge)](https://www.skillsdirectory.com/skills/testdriverai-testdriver-locating-elements-testdriverai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: testdriver:locating-elements
description: Find UI elements using natural language descriptions
---
<!-- Generated from locating-elements.mdx. DO NOT EDIT. -->

## Locating Single Elements

Use natural language to describe elements. Descriptions should be specific enough to locate the element, but not too-specific that they break with minor UI changes. For example:

```javascript
await testdriver.find('email input field');
await testdriver.find('first product card in the grid');
await testdriver.find('dropdown menu labeled "Country"');
```

<Info>TestDriver will cache found elements for improved performance on subsequent calls. Learn more about [element caching here](/v7/caching).</Info>

## Debugging Found Elements

After finding an element, you can inspect its properties for debugging:

```javascript
const button = await testdriver.find('submit button');
console.log(button);
```

This outputs all element properties:

```javascript
{
  description: 'submit button',
  found: true,
  x: 150,
  y: 300,
  coordinates: { x: 150, y: 300, centerX: 200, centerY: 320 },
  threshold: 0.8,
  confidence: 0.95,
  similarity: 0.92,
  selector: 'button[type="submit"]',
  cache: {
    hit: true,
    strategy: 'pixel-diff',
    createdAt: '2025-01-15T10:30:00Z',
    diffPercent: 0.02,
    imageUrl: 'https://...'
  }
}
```

## Working with Multiple Elements

Find and interact with multiple elements:

```javascript
// Find all matching elements
const products = await testdriver.findAll('product card');
console.log(`Found ${products.length} products`);

// Interact with each
for (const product of products) {
  const title = await product.find('title text');
  console.log('Product:', title.text);

  await product.find('add to cart button').click();
}

// Or find specific element
const firstProduct = products[0];
await firstProduct.click();
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.