Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PageWait<Store, PageType, IsOpenOpts, IsClosedOpts>

This class defines all wait functions of a Page.

template

Store type of the PageNodeStore instance which can be used to retrieve/create PageNodes via Page

template

PageType type of the Page for which PageWait defines all wait functions

template

IsOpenOpts type of the opts parameter passed to the function isOpen

template

IsClosedOpts type of the opts parameter passed to the function isClosed

Type parameters

  • Store: PageNodeStore

  • PageType: Page<Store, IsOpenOpts, IsClosedOpts>

  • IsOpenOpts: object

  • IsClosedOpts: object

Hierarchy

  • PageWait

Index

Constructors

Properties

Methods

Constructors

constructor

  • new PageWait(page: PageType): PageWait

Properties

Protected _page

_page: PageType

the Page for which PageWait defines all wait functions

Methods

Protected _wait

  • _wait(conditionFunc: function, conditionMessage: string, opts?: ITimeoutInterval): PageType
  • A function which provides common functionality to wait for a certain conditionFunc to return true within a specific timeout.

    Parameters

    • conditionFunc: function

      the condition which is expected to return true within a specific timeout

        • (): boolean
        • Returns boolean

    • conditionMessage: string

      a message used to describe the checked condition in error messages

    • Default value opts: ITimeoutInterval = Object.create(null)

      includes the timeout within which the condition is expected to return true and the interval used to check for this condition.

      If no timeout is specified, the Page's default timeout is used instead. If no interval is specified, the Page's default interval is used instead.

    Returns PageType

isClosed

  • Waits for Page to become closed and throws an error of the Page does not become closed within a specific timeout.

    Parameters

    • Default value opts: IsClosedOpts & ITimeoutInterval = Object.create(null)

      includes the options defined in IsClosedOpts, the timeout within which the Page must become closed and the interval used to check for this condition.

      If no timeout is specified, the Page's default timeout is used instead. If no interval is specified, the Page's default interval is used instead.

    Returns PageType

    Page

isOpen

  • Waits for Page to become open and throws an error of the Page does not become open within a specific timeout.

    Parameters

    • Default value opts: IsOpenOpts & ITimeoutInterval = Object.create(null)

      includes the options defined in IsOpenOpts, the timeout within which the Page must become open and the interval used to check for this condition.

      If no timeout is specified, the Page's default timeout is used instead. If no interval is specified, the Page's default interval is used instead.

    Returns PageType

    Page

Generated using TypeDoc