Skip to main content
Interaction commands enable you to simulate user interactions including clicks, inputs, scrolling, and other user actions. These commands are essential for automating user workflows and interacting with web pages and applications.

Overview

Interaction commands provide functionality for:
  • Clicking elements (single click, double click, right click)
  • Inputting text into form fields
  • Scrolling pages and elements
  • Hovering over elements
  • Keyboard interactions (key presses, shortcuts)
  • Drag and drop operations

Common Use Cases

  • Form Automation: Automate form filling and submission
  • Navigation: Click links and buttons to navigate
  • User Simulation: Simulate real user interactions
  • Workflow Automation: Automate complex user workflows
  • Dynamic Content: Trigger dynamic content loading through interactions

Command Parameters

Interaction commands typically support the following parameters:
ParameterTypeDescriptionRequired
selectorstringCSS selector for element targetingYes
actionstringInteraction type (click, input, scroll, etc.)Yes
valuestringInput value for input actionsNo
timeoutnumberMaximum wait time in millisecondsNo
waitForElementbooleanWait for element to be visibleNo

Interaction Types

Click Actions

  • Single Click: Standard click on element
  • Double Click: Double-click action
  • Right Click: Context menu trigger
  • Long Press: Long press action

Input Actions

  • Type Text: Input text into fields
  • Clear and Type: Clear field and input new text
  • Append Text: Append text to existing content
  • Scroll: Scroll page or element
  • Scroll Into View: Scroll element into viewport
  • Navigate: Navigate to URL

Best Practices

  • Wait for Elements: Ensure elements are visible before interaction
  • Use Stable Selectors: Use reliable CSS selectors that won’t break
  • Handle Dynamic Content: Account for content that loads after interaction
  • Set Appropriate Timeouts: Configure timeouts for element visibility
  • Test Interactions: Verify interactions work as expected