Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ValuePageElementCurrently<Store, PageElementType, ValueType>

This class defines all currently 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 ValuePageElementCurrently defines all currently functions

template

ValueType the type of ValuePageElement's value

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Protected _node

_node: PageElementType

the PageNode for which PageNodeCurrently defines all currently functions

Accessors

element

  • get element(): Client<RawResult<Element>> & RawResult<Element>

not

  • get not(): object

Methods

Protected _compareContains

  • _compareContains<T>(expected: T, actual: T): boolean

Protected _compareHas

  • _compareHas<T>(expected: T, actual: T): boolean

Protected _compareHasAny

  • _compareHasAny<T>(actual: T): boolean

Protected _withinTolerance

  • _withinTolerance(actual: number, expected: number, tolerance?: number): boolean

Protected _writeLastDiff

  • _writeLastDiff<T>(actual: T, expected?: T): void

containsAttribute

  • containsAttribute(attribute: IAttribute): boolean

containsClass

  • containsClass(className: string): boolean

containsDirectText

  • containsDirectText(directText: string): boolean
  • Returns true if the PageElement's actual direct text currently contains the expected 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.

    Parameters

    • directText: string

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

    Returns boolean

containsHTML

  • containsHTML(html: string): boolean

containsId

  • containsId(id: string): boolean

containsName

  • containsName(name: string): boolean

containsText

  • containsText(text: string): boolean

containsValue

  • containsValue(value: ValueType): boolean
  • Returns true if the ValuePageElement's actual value currently contains the expected value.

    Parameters

    • value: ValueType

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

    Returns boolean

exists

  • exists(): boolean

getAttribute

  • getAttribute(attributeName: string): string
  • Returns the current value of PageElement's HTML attribute with the passed attribute name.

    Overwriting this function affects the behavior of the functions getAttribute, hasAttribute, containsAttribute and hasAnyAttribute in PageElement and its currently, wait and eventually APIs.

    Parameters

    • attributeName: string

      the name of the HTML attribute whose current value should be returned

    Returns string

getClass

  • getClass(): string

getContainsDirectText

  • getContainsDirectText(directText: string): boolean
  • Returns PageElement's current 'containsDirectText' status.

    A PageElement's 'containsDirectText' status is set to true if its actual direct text contains the expected 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.

    Parameters

    • directText: string

      the expected direct text used in the comparison which sets the 'containsDirectText' status

    Returns boolean

getContainsText

  • getContainsText(text: string): boolean

getContainsValue

  • getContainsValue(value: ValueType): boolean
  • Returns ValuePageElement's current 'containsValue' status.

    A ValuePageElement's 'containsValue' status is set to true if its actual value contains the expected value.

    Parameters

    • value: ValueType

      the expected value used in the comparison which sets the 'containsValue' status

    Returns boolean

getDirectText

  • getDirectText(): string
  • Returns PageElement's current 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.

    Overwriting this function affects the behavior of the functions getDirectText, hasDirectText, containsDirectText and hasAnyDirectText in PageElement and its currently, wait and eventually APIs.

    Returns string

getExists

  • getExists(): boolean

getHTML

  • getHTML(): string

getHasAnyDirectText

  • getHasAnyDirectText(): boolean
  • Returns PageElement's current 'hasAnyDirectText' status.

    A PageElement's 'hasAnyDirectText' status is set to true if it 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

getHasAnyText

  • getHasAnyText(): boolean

getHasAnyValue

  • getHasAnyValue(): boolean

getHasDirectText

  • getHasDirectText(directText: string): boolean
  • Returns PageElement's current 'hasDirectText' status.

    A PageElement's 'hasDirectText' status is set to true if its actual direct text equals the expected 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.

    Parameters

    • directText: string

      the expected direct text used in the comparison which sets the 'hasDirectText' status

    Returns boolean

getHasText

  • getHasText(text: string): boolean

getHasValue

  • getHasValue(value: ValueType): boolean
  • Returns ValuePageElement's current 'hasValue' status.

    A ValuePageElement's 'hasValue' status is set to true if its actual value equals the expected value.

    Parameters

    • value: ValueType

      the expected value used in the comparison which sets the 'hasValue' status

    Returns boolean

getHeight

  • getHeight(): number

getId

  • getId(): string

getIsEnabled

  • getIsEnabled(): boolean

getIsVisible

  • getIsVisible(): boolean

getLocation

getName

  • getName(): string

getSize

getText

  • getText(): string

Abstract getValue

  • getValue(): ValueType

getWidth

  • getWidth(): number

getX

  • getX(): number

getY

  • getY(): number

hasAnyAttribute

  • hasAnyAttribute(attributeName: string): boolean

hasAnyClass

  • hasAnyClass(): boolean

hasAnyDirectText

  • hasAnyDirectText(): boolean

hasAnyHTML

  • hasAnyHTML(): boolean

hasAnyId

  • hasAnyId(): boolean

hasAnyName

  • hasAnyName(): boolean

hasAnyText

  • hasAnyText(): boolean

hasAnyValue

  • hasAnyValue(): boolean

hasAttribute

hasClass

  • hasClass(className: string): boolean

hasDirectText

  • hasDirectText(directText: string): boolean
  • Returns true if the PageElement's actual direct text currently equals the expected 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.

    Parameters

    • directText: string

      the expected direct text which is supposed to equal the actual direct text

    Returns boolean

hasHTML

  • hasHTML(html: string): boolean

hasHeight

  • hasHeight(height: number, tolerance?: number): boolean
  • Returns true 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

hasId

  • hasId(id: string): boolean

hasLocation

  • Returns true 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

    • Default value tolerances: Partial<ICoordinates> = { x: 0, y: 0 }

      used to calculate the maximal allowed deviations from the expected coordinates

    Returns boolean

hasName

  • hasName(name: string): boolean

hasSize

  • hasSize(size: ISize, tolerances?: Partial<ISize>): boolean
  • Returns true 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

    • Default value tolerances: Partial<ISize> = { width: 0, height: 0 }

      used to calculate the maximal allowed deviations from the expected size

    Returns boolean

hasText

  • hasText(text: string): boolean

hasValue

  • hasValue(value: ValueType): boolean

hasWidth

  • hasWidth(width: number, tolerance?: number): boolean
  • Returns true 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

hasX

  • hasX(x: number, tolerance?: number): boolean
  • Returns true 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

hasY

  • hasY(y: number, tolerance?: number): boolean
  • Returns true 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

isChecked

  • isChecked(): boolean

isEnabled

  • isEnabled(): boolean

isSelected

  • isSelected(): boolean

isVisible

  • isVisible(): boolean

Generated using TypeDoc