pub fn build_text_selector(text: &str, element_type: Option<&str>) -> StringExpand description
Build a CSS selector to find elements by visible text.
This creates a selector that matches elements containing the specified text. Note: This is a best-effort approach and may not work for all cases.
§Arguments
text- The text to search forelement_type- Optional element type to restrict the search (e.g., “button”)
§Returns
A CSS selector string (or XPath for more complex cases)