Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AccessorUtil

Hierarchy

  • AccessorUtil

Index

Constructors

constructor

Properties

relationResolver

relationResolver: RelationsResolver

testExecutionContext

testExecutionContext: TestExecutionContext

webDriver

webDriver: ThenableWebDriver

Accessors

logger

  • get logger(): SimpleLogger

Methods

_fetchElements

  • _fetchElements(query: SahiElementQuery, retry?: number): Promise<WebElement[]>

enableHook

  • enableHook(): Promise<void>

fetchElement

fetchElements

  • fetchElements(query: SahiElementQuery, retry?: number, waitTimeout?: number): Promise<WebElement[]>

findElements

  • findElements(locator: Locator): Promise<WebElement[]>

getByRegEx

  • getByRegEx(elements: WebElement[], regEx: RegExp): Promise<WebElement[]>

getByString

  • getByString(elements: WebElement[], identifier: string): Promise<WebElement[]>

getElementBySahiClassName

  • getElementBySahiClassName(elements: WebElement[], __namedParameters: object): Promise<WebElement[]>

getElementBySahiIndex

getStringIdentifiersForElement

  • getStringIdentifiersForElement(element: WebElement): Promise<string[]>
  • Reads values from potential identifier attributes of an element this is used to perform fuzzy string matching on element such as _div('some fuzzy buzzy')

    The list is ordered by the relevance of the identifier (first match counts)

    • [aria-describedby]
    • [name]
    • [id]
    • className
    • innerText
    • value
    • src

    Parameters

    • element: WebElement

    Returns Promise<string[]>

openRequests

  • openRequests(): Promise<number>

resetRequests

  • resetRequests(): Promise<void>

resolveByIdentifier

  • resolveByIdentifier(elements: WebElement[], identifier: AccessorIdentifier): Promise<WebElement[]>

waitForOpenRequests

  • waitForOpenRequests(timeout: number): Promise<void>