Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValuePageElementWait<Store, PageElementType, ValueType>

This class defines all wait functions of ValuePageElement.

template

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

template

PageElementType type of the ValuePageElement for which ValuePageElementWait defines all wait functions

template

ValueType the type of ValuePageElement's value

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Protected _node

_node: PageElementType

the PageNode for which PageNodeWait defines all wait functions

Accessors

not

  • get not(): object
  • returns the negated variants of ValuePageElementWait's state check functions

    Returns object

    • containsValue: function
      • Waits for ValuePageElement's actual value not to contain the expected value.

        Throws an error if the condition is not met within a specific timeout.

        Parameters

        • value: ValueType

          the expected value which is supposed not to be contained in the actual value

        • Optional opts: ITimeoutInterval

          includes the timeout within which the condition is expected to be met and the interval used to check it

          If no timeout is specified, ValuePageElement's default timeout is used. If no interval is specified, ValuePageElement's default interval is used.

        Returns PageElementType

        this (an instance of ValuePageElement)

    • hasAnyValue: function
      • Waits for ValuePageElement not to have any value.

        Throws an error if the condition is not met within a specific timeout.

        Parameters

        • Optional opts: ITimeoutInterval

          includes the timeout within which the condition is expected to be met and the interval used to check it

          If no timeout is specified, ValuePageElement's default timeout is used. If no interval is specified, ValuePageElement's default interval is used.

        Returns PageElementType

        this (an instance of ValuePageElement)

    • hasValue: function
      • Waits for ValuePageElement's actual value not to equal the expected value.

        Throws an error if the condition is not met within a specific timeout.

        Parameters

        • value: ValueType

          the expected value which is supposed not to equal the actual value

        • Optional opts: ITimeoutInterval

          includes the timeout within which the condition is expected to be met and the interval used to check it

          If no timeout is specified, ValuePageElement's default timeout is used. If no interval is specified, ValuePageElement's default interval is used.

        Returns PageElementType

        this (an instance of ValuePageElement)

Methods

Protected _makeReverseParams

Protected _waitContainsProperty

  • _waitContainsProperty<T>(name: string, expectedValue: T, conditionFunc: function, opts?: ITimeoutReverseInterval): PageElementType
  • This function waits for an actual value to contain an expected value.

    It does so by regularly invoking a condition function until it returns true or until a specific timeout is reached.

    A WaitUntilTimeoutError will be thrown if the condition function's return value does not become true within the specific timeout.

    Type parameters

    • T

    Parameters

    • name: string

      the name of the property for which the wait condition is performed

    • expectedValue: T

      the expected value passed to the conditionFunc

    • conditionFunc: function

      a function which compares the actual and the expected value

        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition function is expected to become true, the interval used to invoke the condition function and a reverse flag which, if set to true, negates the result of the condition function

    Returns PageElementType

Protected _waitHasAnyProperty

  • This function waits for a property to have any value.

    It does so by regularly invoking a condition function until it returns true or until a specific timeout is reached.

    A WaitUntilTimeoutError will be thrown if the condition function's return value does not become true within the specific timeout.

    Type parameters

    • T

    Parameters

    • name: string

      the name of the property for which the wait condition is performed

    • conditionFunc: function

      a function which checks if a property has any value

        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition function is expected to become true, the interval used to invoke the condition function and a reverse flag which, if set to true, negates the result of the condition function

    Returns PageElementType

Protected _waitHasProperty

  • _waitHasProperty<T>(name: string, expectedValue: T, conditionFunc: function, opts?: ITimeoutReverseInterval): PageElementType
  • This function waits for an actual value to have/equal an expected value.

    It does so by regularly invoking a condition function until it returns true or until a specific timeout is reached.

    A WaitUntilTimeoutError will be thrown if the condition function's return value does not become true within the specific timeout.

    Type parameters

    • T

    Parameters

    • name: string

      the name of the property for which the wait condition is performed

    • expectedValue: T

      the expected value passed to the conditionFunc

    • conditionFunc: function

      a function which compares the actual and the expected value

        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition function is expected to become true, the interval used to invoke the condition function and a reverse flag which, if set to true, negates the result of the condition function

    Returns PageElementType

Protected _waitProperty

  • _waitProperty<T>(name: string, conditionType: "has" | "contains" | "any" | "within", conditionFunc: function, __namedParameters?: object, expectedValue?: T): PageElementType
  • This function can be used to assemble and execute a wait state check function to wait for the value of a certain property of an HMTL element to reach an expected state.

    It regularly invokes a condition function until it returns true or until a specific timeout is reached. If an expected value was provided, this value will be passed to the condition function as second parameter.

    A WaitUntilTimeoutError will be thrown if the condition function's return value does not become true within the specific timeout.

    Type parameters

    • T

    Parameters

    • name: string

      the name of the property for which the wait condition is performed

    • conditionType: "has" | "contains" | "any" | "within"

      the type of comparison performed in the conditionFunc

    • conditionFunc: function

      a function which compares an actual with an expected value

    • Default value __namedParameters: object = {}
      • interval: number
      • reverse: boolean
      • timeout: number
    • Optional expectedValue: T

      the expected value passed to the conditionFunc

    Returns PageElementType

Protected _waitUntil

  • _waitUntil<T>(conditionFunc: function, errorMessageFunc: function, __namedParameters?: object): PageElementType
  • This function can be used to assemble and execute a wait state check function to wait for an HMTL element to reach an expected state.

    It regularly invokes a condition function until it returns true or until a specific timeout is reached.

    A WaitUntilTimeoutError will be thrown if the condition function's return value does not become true within the specific timeout.

    Type parameters

    • T

    Parameters

    • conditionFunc: function

      a function which checks if an HTML element has an expected state

        • (): boolean
        • Returns boolean

    • errorMessageFunc: function

      a function that returns an errorMessage if the HTML element didn't reach its expected state

        • (): string
        • Returns string

    • Default value __namedParameters: object = {}
      • interval: number
      • timeout: number

    Returns PageElementType

Protected _waitWdioCheckFunc

  • _waitWdioCheckFunc(checkTypeStr: string, conditionFunc: function, __namedParameters?: object): PageElementType
  • This function wraps webdriverio commands that wait for an HTML element to reach a certain state.

    It does so by invoking a condition function which checks if a certain condition eventually becomes true within a specific timeout.

    A WaitUntilTimeoutError will be thrown and the PageElement's default timeout will be written to _lastdiff if the condition function's return value is false.

    Parameters

    • checkTypeStr: string

      describes what kind of check is performed by the condition function

    • conditionFunc: function

      a function that checks if a certain condition is eventually met within a specific timeout

    • Default value __namedParameters: object = {}
      • interval: number
      • reverse: boolean
      • timeout: number

    Returns PageElementType

Protected _waitWithinProperty

  • _waitWithinProperty<T>(name: string, expectedValue: T, conditionFunc: function, opts?: ITimeoutReverseInterval): PageElementType
  • This function waits for an actual value to lie within a certain range of an expected value.

    It does so by regularly invoking a condition function until it returns true or until a specific timeout is reached.

    A WaitUntilTimeoutError will be thrown if the condition function's return value does not become true within the specific timeout.

    Type parameters

    • T

    Parameters

    • name: string

      the name of the property for which the wait condition is performed

    • expectedValue: T

      the expected value passed to the conditionFunc

    • conditionFunc: function

      a function which compares the actual and the expected value

        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition function is expected to become true, the interval used to invoke the condition function and a reverse flag which, if set to true, negates the result of the condition function

    Returns PageElementType

containsAttribute

  • Waits for the actual value of the specified HTML attribute of PageElement to contain an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • attribute: IAttribute

      the specified HTML attribute of PageElement, consisting of the attribute's name and the value it is expected to contain

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsClass

  • Waits for the actual value of the PageElement's 'class' HTML attribute to contain an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • className: string

      the expected value which is supposed to be contained in the actual value of PageElement's HTML 'class' attribute

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsDirectText

  • Waits for PageElement's actual direct text to contain the expected direct text.

    Throws an error if the condition is not met within a specific timeout.

    A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.

    Parameters

    • directText: string
    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsHTML

  • Waits for PageElement's actual HTML value to contain the expected HTML value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • html: string

      the expected html which is supposed to be contained in the actual html

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsId

  • Waits for the actual value of PageElement's 'id' HTML attribute to contain an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • id: string

      the expected value which is supposed to be contained in the actual value of PageElement's HTML 'id' attribute

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsName

  • Waits for the actual value of PageElement's 'name' HTML attribute to contain an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • name: string

      the expected value which is supposed to be contained in the actual value of PageElement's HTML 'name' attribute

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsText

  • Waits for PageElement's actual text to contain the expected text.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • text: string

      the expected text which is supposed to be contained in the actual text

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

containsValue

  • Waits for ValuePageElement's actual value to contain the expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • value: ValueType

      the expected value which is supposed to be contained in the actual value

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, ValuePageElement's default timeout is used. If no interval is specified, ValuePageElement's default interval is used.

    Returns PageElementType

    this (an instance of ValuePageElement)

exists

  • Waits for PageElement to exist.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Default value opts: ITimeoutReverse = {}

      includes the timeout within which the condition is expected to be met and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyAttribute

  • Waits for the actual value of the specified HTML attribute of PageElement to have any value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • attributeName: string

      the name of a PageElement's HTML attribute which is supposed to have any value

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyClass

  • Waits for PageElement's 'class' HTML attribute to have any value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyDirectText

  • Waits for PageElement to have any direct text.

    Throws an error if the condition is not met within a specific timeout.

    A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.

    Parameters

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyHTML

  • Waits for PageElement to have any HTML value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyId

  • Waits for PageElement's 'id' HTML attribute to have any value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyName

  • Waits for PageElement's 'name' HTML attribute to have any value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyText

  • Waits for PageElement to have any text.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasAnyValue

  • Waits for ValuePageElement to have any value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Default value opts: ITimeoutReverseInterval = {}

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, ValuePageElement's default timeout is used. If no interval is specified, ValuePageElement's default interval is used.

    Returns PageElementType

    this (an instance of ValuePageElement)

hasAttribute

  • Waits for the actual value of the specified HTML attribute of PageElement to equal an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • attribute: IAttribute

      the specified HTML attribute of PageElement, consisting of the attribute's name and the value it is expected to have

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasClass

  • Waits for the actual value of PageElement's 'class' HTML attribute to equal an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • className: string

      the expected value which is supposed to equal the actual value of PageElement's HTML 'class' attribute

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasDirectText

  • Waits for PageElement's actual direct text to equal the expected direct text.

    Throws an error if the condition is not met within a specific timeout.

    A direct text is a text that resides on the level directly below the selected HTML element. It does not include any text of the HTML element's nested children HTML elements.

    Parameters

    • directText: string
    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasHTML

  • Waits for PageElement's actual HTML value to equal the expected HTML value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • html: string

      the expected html which is supposed to equal the actual html

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasHeight

  • Waits for the height of PageElement to equal the expected height or to deviate no more than the specified tolerance from the expected height.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • height: number

      the expected height of PageElement in pixels

    • Default value opts: object & ITimeoutReverseInterval = { tolerance: 0 }

      includes the tolerance used to calculate the maximal allowed deviation from the expected height, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasId

  • Waits for the actual value of PageElement's 'id' HTML attribute to equal an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • id: string

      the expected value which is supposed to equal the actual value of PageElement's 'id' HTML attribute

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasLocation

  • Waits for the location of PageElement to equal the expected coordinates or to deviate no more than the specified tolerances from the expected coordinates.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • coordinates: ICoordinates

      the expected coordinates of PageElement in pixels

    • Default value opts: object & ITimeoutReverseInterval = { tolerances: { x: 0, y: 0 } }

      includes the tolerances used to calculate the maximal allowed deviations from the expected coordinates, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasName

  • Waits for the actual value of PageElement's 'name' HTML attribute to equal an expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • name: string

      the expected value which is supposed to equal the actual value of PageElement's 'name' HTML attribute

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasSize

  • Waits for the size of PageElement to equal the expected size or to deviate no more than the specified tolerances from the expected size.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • size: ISize

      the expected size of PageElement in pixels

    • Default value opts: object & ITimeoutReverseInterval = { tolerances: { width: 0, height: 0 } }

      includes the tolerances used to calculate the maximal allowed deviations from the expected size, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasText

  • Waits for PageElement's actual text to equal the expected text.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • text: string

      the expected text which is supposed to equal the actual text

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasValue

  • Waits for ValuePageElement's actual value to equal the expected value.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • value: ValueType

      the expected value which is supposed to equal the actual value

    • Optional opts: ITimeoutReverseInterval

      includes the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, ValuePageElement's default timeout is used. If no interval is specified, ValuePageElement's default interval is used.

    Returns PageElementType

    this (an instance of ValuePageElement)

hasWidth

  • Waits for the width of PageElement to equal the expected width or to deviate no more than the specified tolerance from the expected width.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • width: number

      the expected width of PageElement in pixels

    • Default value opts: object & ITimeoutReverseInterval = { tolerance: 0 }

      includes the tolerance used to calculate the maximal allowed deviation from the expected width, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasX

  • Waits for the x-location of PageElement to equal the expected x-location or to deviate no more than the specified tolerance from the expected x-location.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • x: number

      the expected x-location of PageElement in pixels

    • Default value opts: object & ITimeoutReverseInterval = { tolerance: 0 }

      includes the tolerance used to calculate the maximal allowed deviation from the expected x-location, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

hasY

  • Waits for the y-location of PageElement to equal the expected y-location or to deviate no more than the specified tolerance from the expected y-location.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • y: number

      the expected y-location of PageElement in pixels

    • Default value opts: object & ITimeoutReverseInterval = { tolerance: 0 }

      includes the tolerance used to calculate the maximal allowed deviation from the expected y-location, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

isChecked

  • Waits for PageElement to be checked.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Default value opts: ITimeoutReverseInterval = {}

      includes filterMask which can be used to skip the invocation of the state check function for some or all managed PageElements, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

isEnabled

  • Waits for PageElement to be enabled.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Default value opts: ITimeoutReverseInterval = {}

      includes filterMask which can be used to skip the invocation of the state check function for some or all managed PageElements, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

isSelected

  • Waits for PageElement to be selected.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Default value opts: ITimeoutReverseInterval = {}

      includes filterMask which can be used to skip the invocation of the state check function for some or all managed PageElements, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

isVisible

  • Waits for PageElement to be visible.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • Default value opts: ITimeoutReverseInterval = {}

      includes filterMask which can be used to skip the invocation of the state check function for some or all managed PageElements, the timeout within which the condition is expected to be met, the interval used to check it and a reverse flag that, if set to true, checks for the condition NOT to be met instead

      If no timeout is specified, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns PageElementType

    this (an instance of PageElement)

untilElement

  • untilElement(description: string, condition: function, __namedParameters?: object): PageElementType
  • Wait for PageElement to meet a certain condition.

    Throws an error if the condition is not met within a specific timeout.

    Parameters

    • description: string

      describes the condition that the PageElement is expected to meet

    • condition: function

      the function which checks if a certain condition is met

        • (element: PageElementType): boolean
        • Parameters

          • element: PageElementType

          Returns boolean

    • Default value __namedParameters: object = {}
      • interval: number
      • timeout: number

    Returns PageElementType

    this (an instance of PageElement)

Generated using TypeDoc