Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICustomElementMatchers

This interface describes custom expectation matchers for PageElements.

It can be used for both positive and negative (.not) comparisons.

Hierarchy

Index

Methods

toBeChecked

  • toBeChecked(): boolean
  • Checks if the PageElement is currently checked.

    Returns boolean

toBeEnabled

  • toBeEnabled(): boolean
  • Checks if the PageElement is currently enabled.

    Returns boolean

toBeSelected

  • toBeSelected(): boolean
  • Checks if the PageElement is currently selected.

    Returns boolean

toBeVisible

  • toBeVisible(): boolean
  • Checks if the PageElement is currently visible.

    Returns boolean

toContainAttribute

  • toContainAttribute(attribute: IAttribute): boolean
  • Checks if the specified HTML attribute of PageElement currently contains the expected value.

    Parameters

    • attribute: IAttribute

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

    Returns boolean

toContainClass

  • toContainClass(className: string): boolean
  • Checks if the 'class' HTML attribute of PageElement currently contains the specified className.

    Parameters

    • className: string

      the className which the 'class' HTML attribute of PageElement is supposed to contain

    Returns boolean

toContainDirectText

  • toContainDirectText(directText: string): boolean
  • Checks if the PageElement currently contains the specified HTML.

    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

      the directText which the PageElement is supposed to contain

    Returns boolean

toContainHTML

  • toContainHTML(html: string): boolean
  • Checks if the PageElement currently contains the specified HTML.

    Parameters

    • html: string

      the HTML which the PageElement is supposed to contain

    Returns boolean

toContainId

  • toContainId(id: string): boolean
  • Checks if the 'id' HTML attribute of PageElement currently contains the specified value.

    Parameters

    • id: string

      the value which the 'id' HTML attribute of PageElement is supposed to contain

    Returns boolean

toContainName

  • toContainName(name: string): boolean
  • Checks if the 'name' HTML attribute of PageElement currently contains the specified value.

    Parameters

    • name: string

      the value which the 'name' HTML attribute of PageElement is supposed to contain

    Returns boolean

toContainText

  • toContainText(text: string): boolean
  • Checks if the PageElement currently contains the specified text.

    Parameters

    • text: string

      the text which the PageElement is supposed to contain

    Returns boolean

toEventuallyBeChecked

  • Checks if the PageElement eventually becomes checked 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyBeEnabled

  • toEventuallyBeEnabled(opts?: ITimeout): boolean
  • Checks if the PageElement eventually becomes enabled within a specific timeout.

    Parameters

    • Optional opts: ITimeout

      Includes the timeout within which the condition is expected to be met.

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

    Returns boolean

toEventuallyBeSelected

  • toEventuallyBeSelected(opts?: ITimeout): boolean
  • Checks if the PageElement eventually becomes selected within a specific timeout.

    Parameters

    • Optional opts: ITimeout

      Includes the timeout within which the condition is expected to be met.

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

    Returns boolean

toEventuallyBeVisible

  • toEventuallyBeVisible(opts?: ITimeout): boolean
  • Checks if the PageElement eventually becomes visible within a specific timeout.

    Parameters

    • Optional opts: ITimeout

      Includes the timeout within which the condition is expected to be met.

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

    Returns boolean

toEventuallyContainAttribute

  • Checks if the specified HTML attribute of PageElement eventually contains the expected value 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: 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyContainClass

  • Checks if the 'class' HTML attribute of PageElement eventually contains the specified className within a specific timeout.

    Parameters

    • className: string

      the className which the 'class' HTML attribute of PageElement is supposed to contain

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyContainDirectText

  • toEventuallyContainDirectText(directText: string, opts?: ITimeoutInterval): boolean
  • Checks if the PageElement eventually contains the specified direct text 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

      the direct text which the PageElement is supposed to contain

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyContainHTML

  • Checks if the PageElement eventually contains the specified HTML within a specific timeout.

    Parameters

    • html: string

      the HTML which the PageElement is supposed to contain

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyContainId

  • Checks if the 'id' HTML attribute of PageElement eventually contains the specified value within a specific timeout.

    Parameters

    • id: string

      the value which the 'id' HTML attribute of PageElement is supposed to contain

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyContainName

  • Checks if the 'name' HTML attribute of PageElement eventually contains the specified value within a specific timeout.

    Parameters

    • name: string
    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyContainText

  • Checks if the PageElement eventually contains the specified text within a specific timeout.

    Parameters

    • text: string

      the text which the PageElement is supposed to contain

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyExist

  • toEventuallyExist(opts?: ITimeout): boolean
  • Checks if the PageElement eventually exists within a specific timeout.

    Parameters

    • Optional opts: ITimeout

      Includes the timeout within which the condition is expected to be met.

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

    Returns boolean

toEventuallyHaveAnyAttribute

  • toEventuallyHaveAnyAttribute(attributeName: string, opts?: ITimeoutInterval): boolean
  • Checks if the HTML attribute with the specified attributeName of PageElement eventually has any value within a specific timeout.

    Parameters

    • attributeName: string

      the specified attributeName of an HTML attribute of PageElement which is supposed to have any 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAnyClass

  • Checks if the 'class' HTML attribute of PageElement eventually has any className 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAnyDirectText

  • Checks if the PageElement eventually has any direct text 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: 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAnyHTML

  • Checks if the PageElement eventually has any HTML 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAnyId

  • Checks if the 'id' HTML attribute of PageElement eventually has any value 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAnyName

  • Checks if the 'name' HTML attribute of PageElement eventually has any value 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAnyText

  • Checks if the PageElement eventually has any text 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveAttribute

  • Checks if the specified HTML attribute of PageElement eventually has the expected value 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: 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveClass

  • Checks if the 'class' HTML attribute of PageElement eventually has the specified className within a specific timeout.

    Parameters

    • className: string

      the className which the 'class' HTML attribute of PageElement is supposed to have

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveDirectText

  • toEventuallyHaveDirectText(directText: string, opts?: ITimeoutInterval): boolean
  • Checks if the PageElement eventually has the specified direct text 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

      the direct text which the PageElement is supposed to have

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveHTML

  • Checks if the PageElement eventually has the specified HTML within a specific timeout.

    Parameters

    • html: string

      the HTML which the PageElement is supposed to have

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveHeight

  • toEventuallyHaveHeight(height: number, opts?: object & ITimeoutInterval): boolean
  • Checks if - eventually within a specific timeout - the height of PageElement matches the specified height or if PageElement's height deviates no more than the specified tolerance from the specified height.

    Parameters

    • height: number

      the expected height of PageElement

    • Optional opts: object & ITimeoutInterval

      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 and the interval used to check it.

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

    Returns boolean

toEventuallyHaveId

  • Checks if the 'id' HTML attribute of PageElement eventually has the specified value within a specific timeout.

    Parameters

    • id: string

      the value which the 'id' HTML attribute of PageElement is supposed to have

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveLocation

  • Checks if - eventually within a specific timeout - the location of PageElement matches the specified coordinates or if its location deviates no more than the specified tolerances from the specified coordinates.

    Parameters

    • coordinates: ICoordinates

      the expected coordinates of PageElement

    • Optional opts: object & ITimeoutInterval

      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 and the interval used to check it.

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

    Returns boolean

toEventuallyHaveName

  • Checks if the 'name' HTML attribute of PageElement eventually has the specified value within a specific timeout.

    Parameters

    • name: string
    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveSize

  • Checks if - eventually within a specific timeout - the size of PageElement matches the specified size or if PageElement's size deviates no more than the specified tolerances from the specified size.

    Parameters

    • size: ISize

      the expected size of PageElement

    • Optional opts: object & ITimeoutInterval

      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 and the interval used to check it.

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

    Returns boolean

toEventuallyHaveText

  • Checks if the PageElement eventually has the specified text within a specific timeout.

    Parameters

    • text: string

      the text which the PageElement is supposed to have

    • 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, PageElement's default timeout is used. If no interval is specified, PageElement's default interval is used.

    Returns boolean

toEventuallyHaveWidth

  • toEventuallyHaveWidth(width: number, opts?: object & ITimeoutInterval): boolean
  • Checks if - eventually within a specific timeout - the width of PageElement matches the specified width or if PageElement's width deviates no more than the specified tolerance from the specified width.

    Parameters

    • width: number

      the expected width of PageElement

    • Optional opts: object & ITimeoutInterval

      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 and the interval used to check it.

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

    Returns boolean

toEventuallyHaveX

  • Checks if - eventually within a specific timeout - the x-location of PageElement matches the specified x-location or if PageElement's x-location deviates no more than the specified tolerance from the specified x-location.

    Parameters

    • x: number

      the expected x-location of PageElement

    • Optional opts: object & ITimeoutInterval

      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 and the interval used to check it.

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

    Returns boolean

toEventuallyHaveY

  • Checks if - eventually within a specific timeout - the y-location of PageElement matches the specified y-location or if PageElement's y-location deviates no more than the specified tolerance from the specified y-location.

    Parameters

    • y: number

      the expected y-location of PageElement

    • Optional opts: object & ITimeoutInterval

      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 and the interval used to check it.

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

    Returns boolean

toExist

  • toExist(): boolean
  • Checks if the PageElement currently exists.

    Returns boolean

toHaveAnyAttribute

  • toHaveAnyAttribute(attributeName: string): boolean
  • Checks if the HTML attribute with the specified attributeName of PageElement currently has any value.

    Parameters

    • attributeName: string

      the specified attributeName of an HTML attribute of PageElement which is supposed to have any value

    Returns boolean

toHaveAnyClass

  • toHaveAnyClass(): boolean
  • Checks if the 'class' HTML attribute of PageElement currently has any className.

    Returns boolean

toHaveAnyDirectText

  • toHaveAnyDirectText(): boolean
  • Checks if the PageElement currently has any direct text.

    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.

    Returns boolean

toHaveAnyHTML

  • toHaveAnyHTML(): boolean
  • Checks if the PageElement currently has any HTML.

    Returns boolean

toHaveAnyId

  • toHaveAnyId(): boolean
  • Checks if the 'id' HTML attribute of PageElement currently has any value.

    Returns boolean

toHaveAnyName

  • toHaveAnyName(): boolean
  • Checks if the 'name' HTML attribute of PageElement currently has any value.

    Returns boolean

toHaveAnyText

  • toHaveAnyText(): boolean
  • Checks if the PageElement currently has any text.

    Returns boolean

toHaveAttribute

  • Checks if the specified HTML attribute of PageElement currently has the expected value.

    Parameters

    • attribute: IAttribute

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

    Returns boolean

toHaveClass

  • toHaveClass(className: string): boolean
  • Checks if the 'class' HTML attribute of PageElement currently has the specified className.

    Parameters

    • className: string

      the className which the 'class' HTML attribute of PageElement is supposed to have

    Returns boolean

toHaveDirectText

  • toHaveDirectText(directText: string): boolean
  • Checks if the PageElement currently has the specified text.

    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

      the directText which the PageElement is supposed to have

    Returns boolean

toHaveHTML

  • toHaveHTML(html: string): boolean
  • Checks if the PageElement currently has the specified HTML.

    Parameters

    • html: string

      the HTML which the PageElement is supposed to have

    Returns boolean

toHaveHeight

  • toHaveHeight(height: number, tolerance?: number): boolean
  • Checks if - currently - the height of PageElement matches the specified height or if PageElement's height deviates no more than the specified tolerance from the specified height.

    Parameters

    • height: number

      the expected height of PageElement

    • Optional tolerance: number

      used to calculate the maximal allowed deviation from the expected height

    Returns boolean

toHaveId

  • toHaveId(id: string): boolean
  • Checks if the 'id' HTML attribute of PageElement currently has the specified value.

    Parameters

    • id: string

      the value which the 'id' HTML attribute of PageElement is supposed to have

    Returns boolean

toHaveLocation

  • Checks if - currently - the location of PageElement matches the specified coordinates or if its location deviates no more than the specified tolerances from the specified coordinates.

    Parameters

    • coordinates: ICoordinates

      the expected coordinates of PageElement

    • Optional tolerances: Partial<ICoordinates>

      used to calculate the maximal allowed deviations from the expected coordinates

    Returns boolean

toHaveName

  • toHaveName(name: string): boolean
  • Checks if the 'name' HTML attribute of PageElement currently has the specified value.

    Parameters

    • name: string

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

    Returns boolean

toHaveSize

  • toHaveSize(size: ISize, tolerances?: Partial<ISize>): boolean
  • Checks if - currently - the size of PageElement matches the specified size or if PageElement's size deviates no more than the specified tolerances from the specified size.

    Parameters

    • size: ISize

      the expected size of PageElement

    • Optional tolerances: Partial<ISize>

      used to calculate the maximal allowed deviations from the expected size

    Returns boolean

toHaveText

  • toHaveText(text: string): boolean
  • Checks if the PageElement currently has the specified text.

    Parameters

    • text: string

      the text which the PageElement is supposed to have

    Returns boolean

toHaveWidth

  • toHaveWidth(width: number, tolerance?: number): boolean
  • Checks if - currently - the width of PageElement matches the specified width or if PageElement's width deviates no more than the specified tolerance from the specified width.

    Parameters

    • width: number

      the expected width of PageElement

    • Optional tolerance: number

      used to calculate the maximal allowed deviation from the expected width

    Returns boolean

toHaveX

  • toHaveX(x: number, tolerance?: number): boolean
  • Checks if - currently - the x-location of PageElement matches the specified x-location or if PageElement's x-location deviates no more than the specified tolerance from the specified x-location.

    Parameters

    • x: number

      the expected x-location of PageElement

    • Optional tolerance: number

      used to calculate the maximal allowed deviation from the expected x-location

    Returns boolean

toHaveY

  • toHaveY(y: number, tolerance?: number): boolean
  • Checks if - currently - the y-location of PageElement matches the specified y-location or if PageElement's y-location deviates no more than the specified tolerance from the specified y-location.

    Parameters

    • y: number

      the expected y-location of PageElement

    • Optional tolerance: number

      used to calculate the maximal allowed deviation from the expected y-location

    Returns boolean

Generated using TypeDoc