Class: ReactInteractor
Defined in: react-core/src/ReactInteractor.ts:21
Extends
DOMInteractor
Constructors
Constructor
new ReactInteractor(
rootEl?
):ReactInteractor
Defined in: dom-core/dist/index.d.ts:6
Parameters
rootEl?
HTMLElement
Returns
ReactInteractor
Inherited from
DOMInteractor.constructor
Properties
rootEl
protected
readonly
rootEl:HTMLElement
Defined in: dom-core/dist/index.d.ts:5
Inherited from
DOMInteractor.rootEl
Methods
calculateMousePosition()
protected
calculateMousePosition(el
,preferredPoint?
):Point
Defined in: dom-core/dist/index.d.ts:11
Parameters
el
Element
preferredPoint?
Point
Returns
Point
Inherited from
DOMInteractor.calculateMousePosition
click()
click(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:28
Dispatch a click event on the element that matches the locator.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<ClickOption
>
Optional click configuration such as the click position
Returns
Promise
<void
>
A promise that resolves after the event is triggered
Overrides
DOMInteractor.click
clone()
clone():
Interactor
Defined in: react-core/src/ReactInteractor.ts:117
Returns
Interactor
Overrides
DOMInteractor.clone
enterText()
enterText(
locator
,text
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:22
Type text into the element matched by the locator.
Parameters
locator
PartLocator
Locator used to find the target element
text
string
The string to type
option?
Partial
<EnterTextOption
>
Options such as appending or replacing existing value
Returns
Promise
<void
>
Promise resolved when typing has completed
Overrides
DOMInteractor.enterText
exists()
exists(
locator
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:112
Parameters
locator
PartLocator
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.exists
focus()
focus(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:82
Move focus to the element found by the locator.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<FocusOption
>
Returns
Promise
<void
>
Promise resolved when focus has been applied
Overrides
DOMInteractor.focus
getAttribute()
Call Signature
getAttribute(
locator
,name
,isMultiple
):Promise
<readonlystring
[]>
Defined in: dom-core/dist/index.d.ts:7
Parameters
locator
PartLocator
name
string
isMultiple
true
Returns
Promise
<readonly string
[]>
Inherited from
DOMInteractor.getAttribute
Call Signature
getAttribute(
locator
,name
,isMultiple
):Promise
<Optional
<string
>>
Defined in: dom-core/dist/index.d.ts:8
Parameters
locator
PartLocator
name
string
isMultiple
false
Returns
Promise
<Optional
<string
>>
Inherited from
DOMInteractor.getAttribute
Call Signature
getAttribute(
locator
,name
):Promise
<Optional
<string
>>
Defined in: dom-core/dist/index.d.ts:9
Parameters
locator
PartLocator
name
string
Returns
Promise
<Optional
<string
>>
Inherited from
DOMInteractor.getAttribute
getElement()
Call Signature
getElement<
T
>(locator
,isMultiple
):Promise
<readonlyT
[]>
Defined in: dom-core/dist/index.d.ts:113
Type Parameters
T
T
extends Element
= Element
Parameters
locator
PartLocator
isMultiple
true
Returns
Promise
<readonly T
[]>
Inherited from
DOMInteractor.getElement
Call Signature
getElement<
T
>(locator
,isMultiple
):Promise
<Optional
<T
>>
Defined in: dom-core/dist/index.d.ts:114
Type Parameters
T
T
extends Element
= Element
Parameters
locator
PartLocator
isMultiple
false
Returns
Promise
<Optional
<T
>>
Inherited from
DOMInteractor.getElement
Call Signature
getElement<
T
>(locator
):Promise
<Optional
<T
>>
Defined in: dom-core/dist/index.d.ts:115
Type Parameters
T
T
extends Element
= Element
Parameters
locator
PartLocator
Returns
Promise
<Optional
<T
>>
Inherited from
DOMInteractor.getElement
getInputValue()
getInputValue(
locator
):Promise
<Optional
<string
>>
Defined in: dom-core/dist/index.d.ts:116
Parameters
locator
PartLocator
Returns
Promise
<Optional
<string
>>
Inherited from
DOMInteractor.getInputValue
getSelectLabels()
getSelectLabels(
locator
):Promise
<Optional
<readonlystring
[]>>
Defined in: dom-core/dist/index.d.ts:118
Get the select element's selected options' labels
Parameters
locator
PartLocator
Returns
Promise
<Optional
<readonly string
[]>>
Inherited from
DOMInteractor.getSelectLabels
getSelectValues()
getSelectValues(
locator
):Promise
<Optional
<readonlystring
[]>>
Defined in: dom-core/dist/index.d.ts:117
Get the select element's selected options' values
Parameters
locator
PartLocator
Returns
Promise
<Optional
<readonly string
[]>>
Inherited from
DOMInteractor.getSelectValues
getStyleValue()
getStyleValue(
locator
,propertyName
):Promise
<Optional
<string
>>
Defined in: dom-core/dist/index.d.ts:10
Get the value of a style property
Parameters
locator
PartLocator
propertyName
CssProperty
Returns
Promise
<Optional
<string
>>
Inherited from
DOMInteractor.getStyleValue
getText()
getText(
locator
):Promise
<Optional
<string
>>
Defined in: dom-core/dist/index.d.ts:119
Parameters
locator
PartLocator
Returns
Promise
<Optional
<string
>>
Inherited from
DOMInteractor.getText
hasAttribute()
hasAttribute(
locator
,name
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:125
Parameters
locator
PartLocator
name
string
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.hasAttribute
hasCssClass()
hasCssClass(
locator
,className
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:124
Parameters
locator
PartLocator
className
string
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.hasCssClass
hover()
hover(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:34
Move the mouse over the element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<HoverOption
>
Returns
Promise
<void
>
A promise that resolves after the hover event
Overrides
DOMInteractor.hover
innerHTML()
innerHTML(
locator
):Promise
<string
>
Defined in: dom-core/dist/index.d.ts:126
Get the HTML of an element
Parameters
locator
PartLocator
Returns
Promise
<string
>
Inherited from
DOMInteractor.innerHTML
isChecked()
isChecked(
locator
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:120
Parameters
locator
PartLocator
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.isChecked
isDisabled()
isDisabled(
locator
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:121
Parameters
locator
PartLocator
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.isDisabled
isReadonly()
isReadonly(
locator
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:122
Parameters
locator
PartLocator
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.isReadonly
isVisible()
isVisible(
locator
):Promise
<boolean
>
Defined in: dom-core/dist/index.d.ts:123
Parameters
locator
PartLocator
Returns
Promise
<boolean
>
Inherited from
DOMInteractor.isVisible
mouseDown()
mouseDown(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:46
Dispatch a mousedown
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<MouseDownOption
>
Allows specifying the mouse position relative to the element
Returns
Promise
<void
>
Promise resolved when the event is dispatched
Overrides
DOMInteractor.mouseDown
mouseEnter()
mouseEnter(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:70
Dispatch a mouseenter
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<MouseEnterOption
>
Returns
Promise
<void
>
Promise resolved after the event dispatches
Overrides
DOMInteractor.mouseEnter
mouseLeave()
mouseLeave(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:76
Dispatch a mouseleave
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<MouseLeaveOption
>
Returns
Promise
<void
>
Promise resolved once the event is dispatched
Overrides
DOMInteractor.mouseLeave
mouseMove()
mouseMove(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:40
Dispatch a mousemove
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<MouseMoveOption
>
Allows specifying the mouse position relative to the element
Returns
Promise
<void
>
A promise that resolves once the event has been dispatched
Overrides
DOMInteractor.mouseMove
mouseOut()
mouseOut(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:64
Dispatch a mouseout
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<MouseOutOption
>
Returns
Promise
<void
>
Promise resolved once the event is dispatched
Overrides
DOMInteractor.mouseOut
mouseOver()
mouseOver(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:58
Dispatch a mouseover
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<HoverOption
>
Optional mouse position relative to the element
Returns
Promise
<void
>
Promise resolved once the event is dispatched
Overrides
DOMInteractor.mouseOver
mouseUp()
mouseUp(
locator
,option?
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:52
Dispatch a mouseup
event on the target element.
Parameters
locator
PartLocator
Locator used to find the target element
option?
Partial
<MouseUpOption
>
Allows specifying the mouse position relative to the element
Returns
Promise
<void
>
Promise resolved when the event is dispatched
Overrides
DOMInteractor.mouseUp
selectOptionValue()
selectOptionValue(
locator
,values
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:88
Select one or more option values in a <select>
element.
Parameters
locator
PartLocator
Locator used to find the select element
values
string
[]
Values of the options to select
Returns
Promise
<void
>
Promise resolved when the options have been selected
Overrides
DOMInteractor.selectOptionValue
wait()
wait(
ms
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:95
Parameters
ms
number
Returns
Promise
<void
>
Overrides
DOMInteractor.wait
waitUntil()
waitUntil<
T
>(option
):Promise
<T
>
Defined in: react-core/src/ReactInteractor.ts:110
Type Parameters
T
T
Parameters
option
WaitUntilOption
<T
>
Returns
Promise
<T
>
Overrides
DOMInteractor.waitUntil
waitUntilComponentState()
waitUntilComponentState(
locator
,option
):Promise
<void
>
Defined in: react-core/src/ReactInteractor.ts:101
Parameters
locator
PartLocator
option
Partial
<Readonly
<WaitForOption
>> = defaultWaitForOption
Returns
Promise
<void
>
Overrides
DOMInteractor.waitUntilComponentState