Verification Actions

Auto-Browse provides a set of core assertions for verifying element states and content. These natural language commands make it easy to validate your application’s behavior.

Supported Assertions

Auto-Browse currently supports four fundamental assertion types:

Element Visibility

Check if elements are visible on the page:
// Verify element visibility
await auto("verify the login button is visible");
await auto("check if error message is displayed");

// Wait and verify
await auto("wait for loading spinner to disappear");
await auto("verify success message becomes visible");

Text Content

Verify the text content of elements:
// Exact text matching
await auto('verify heading text is "Welcome"');
await auto('check if error message says "Invalid input"');

// Dynamic content
await auto("verify message contains order number");
await auto("check if username is displayed correctly");

Element State

Check if elements are enabled:
// Button states
await auto("verify submit button is enabled");
await auto("check if save button is clickable");

// Input field states
await auto("verify email field is enabled");
await auto("check if password field is active");

Checkbox/Radio State

Verify if checkboxes or radio buttons are checked:
// Checkbox verification
await auto('verify "Remember me" checkbox is checked');
await auto('check if "Terms" box is selected');

// Radio button verification
await auto('verify "Express shipping" is selected');
await auto('check if "Credit card" option is checked');

Common Use Cases

Element States and Content Verification
// Verify visibility and text
await auto("verify the login button is visible");
await auto('verify heading text is "Welcome"');

// Check element states
await auto("verify submit button is enabled");
await auto("check if save button is clickable");

// Verify checkbox and radio states
await auto('verify "Remember me" checkbox is checked');
await auto('verify "Express shipping" is selected');

// Wait and verify dynamic content
await auto("wait for loading spinner to disappear");
await auto("verify success message becomes visible");

Key Features

  • Four Assertion Types: Visibility, text content, element state, and checkbox/radio state
  • Smart Waiting: Automatically waits for elements to reach expected states
  • Flexible Matching: Supports exact text and partial content matching
  • Error Handling: Clear feedback when assertions fail

Next Steps