Skip to main content

find_toggle_button

Function find_toggle_button 

Source
pub async fn find_toggle_button(
    adapter: &dyn EngineAdapter,
    data_qa_selectors: &[&str],
    text_to_find: Option<&str>,
    element_types: &[&str],
) -> Result<Option<String>, EngineError>
Expand description

Find a toggle button using multiple strategies.

First tries data-qa selectors, then falls back to text search.

§Arguments

  • adapter - The engine adapter to use
  • data_qa_selectors - List of data-qa selectors to try
  • text_to_find - Text to search for as fallback
  • element_types - Element types to search for text

§Returns

The selector that found elements, or None if not found