Wait for loading state or a locator or url.

Hierarchy

  • Action
    • Wait

Properties

abilityAlias?: string
callStack?: CallStackInfo[]

Methods - Factory

  • Wait for a specific event on page.

    Type Parameters

    • T

    Parameters

    Returns Wait

    new Wait instance

    Example

    simple call

    Wait.forEventOnPage<Download>('download');
    
  • Wait for a specific status of the page.

    Parameters

    • state: "load" | "domcontentloaded" | "networkidle"

      either 'load', 'domcontentloaded' or 'networkidle'

    • Optional options: WaitForLoadStateActionOptions

    Returns Wait

    new Wait instance

    Example

    Wait.forLoadState('networkidle');
    
  • Wait for a specific locator to exist.

    Parameters

    Returns Wait

    new Wait instance

    Example

    simple call with just locator

    Wait.forLocator('myLocator');
    

    with options

    Wait.forLocator(
    'myLocator', {
    hasText: 'myText',
    subLocator: ['mySubLocator', { hasText: 'anotherText' } ]
    }
    );

Methods - Other

  • Parameters

    • entry: CallStackInfo

    Returns void

  • Parameters

    • calledWith: CallStackCalledWith

    Returns void

  • Set the alias which is used for an underlying ability

    Parameters

    • alias: undefined | string

      with which an ability was initialized

    Returns this

    current action

Methods - called internally

  • wait for either a specified loading state or for a locator to become visible/active or url.

    Parameters

    • actor: Actor

      the actor object

    Returns Promise<any>

    Returns when the required load state has been reached.

Generated using TypeDoc