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

enableHook

  • enableHook(): Promise<void>

fetchElement

fetchElements

  • fetchElements(query: SahiElementQuery, 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(elements: WebElement[]): Promise<[WebElement, 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

    • elements: WebElement[]

    Returns Promise<[WebElement, string[]][]>

getTimeout

  • getTimeout(): number

openRequests

  • openRequests(): Promise<number>

resetRequests

  • resetRequests(): Promise<void>

resolveByIdentifier

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

setTimeout

  • setTimeout(timeoutMs: number): void

waitForOpenRequests

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