Skip to main content

click_button

Function click_button 

Source
pub async fn click_button(
    adapter: &dyn EngineAdapter,
    selector: &str,
    options: &ClickOptions,
) -> Result<ClickResult, EngineError>
Expand description

Click a button or element (high-level with scrolling and waits).

This function handles:

  • Scrolling the element into view
  • Clicking the element
  • Verifying the click
  • Waiting for any triggered navigation

§Arguments

  • adapter - The engine adapter to use
  • selector - The CSS selector for the element
  • options - Click options

§Returns

The result of the click operation