butterbidi/browsing_context/types/locator

Types

pub type Locator {
  AccessibilityLocator(
    name: option.Option(String),
    role: option.Option(String),
  )
  CssLocator(value: String)
  ContextLocator(context: browsing_context.BrowsingContext)
  InnerTextLocator(
    value: String,
    ignore_case: option.Option(Bool),
    match_type: option.Option(MatchType),
    max_depth: option.Option(Int),
  )
  XPathLocator(value: String)
}

Constructors

pub type MatchType {
  Full
  Partial
}

Constructors

  • Full
  • Partial

Values

pub fn locator_to_json(locator: Locator) -> json.Json
pub fn new_accessibility_locator(
  name: option.Option(String),
  role: option.Option(String),
) -> Locator
pub fn new_context_locator(
  context: browsing_context.BrowsingContext,
) -> Locator
pub fn new_css_locator(value: String) -> Locator
pub fn new_inner_text_locator(value: String) -> Locator
pub fn new_xpath_locator(value: String) -> Locator
pub fn with_ignore_case(locator: Locator) -> Locator
pub fn with_match_type(
  locator: Locator,
  match_type: MatchType,
) -> Locator
pub fn with_max_depth(
  locator: Locator,
  max_depth: Int,
) -> Locator
Search Document