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.cts:6
Parameters​
rootEl?​
HTMLElement
Returns​
ReactInteractor
Inherited from​
DOMInteractor.constructor
Properties​
rootEl​
protectedreadonlyrootEl:HTMLElement
Defined in: dom-core/dist/index.d.cts:5
Inherited from​
DOMInteractor.rootEl
Methods​
calculateMousePosition()​
protectedcalculateMousePosition(el,preferredPoint?):Point
Defined in: dom-core/dist/index.d.cts: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
Throws​
If the element is not found
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
Throws​
If the element is not found
Overrides​
DOMInteractor.enterText
exists()​
exists(
locator):Promise<boolean>
Defined in: dom-core/dist/index.d.cts:124
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
Throws​
If the element is not found
Overrides​
DOMInteractor.focus
getAttribute()​
Call Signature​
getAttribute(
locator,name,isMultiple):Promise<readonlystring[]>
Defined in: dom-core/dist/index.d.cts: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.cts: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.cts: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.cts:125
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.cts:126
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.cts:127
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.cts:128
Parameters​
locator​
PartLocator
Returns​
Promise<Optional<string>>
Inherited from​
DOMInteractor.getInputValue
getSelectLabels()​
getSelectLabels(
locator):Promise<Optional<readonlystring[]>>
Defined in: dom-core/dist/index.d.cts:130
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.cts:129
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.cts: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.cts:131
Parameters​
locator​
PartLocator
Returns​
Promise<Optional<string>>
Inherited from​
DOMInteractor.getText
hasAttribute()​
hasAttribute(
locator,name):Promise<boolean>
Defined in: dom-core/dist/index.d.cts:137
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.cts:136
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
Throws​
If the element is not found
Overrides​
DOMInteractor.hover
innerHTML()​
innerHTML(
locator):Promise<string>
Defined in: dom-core/dist/index.d.cts:138
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.cts:132
Parameters​
locator​
PartLocator
Returns​
Promise<boolean>
Inherited from​
DOMInteractor.isChecked
isDisabled()​
isDisabled(
locator):Promise<boolean>
Defined in: dom-core/dist/index.d.cts:133
Parameters​
locator​
PartLocator
Returns​
Promise<boolean>
Inherited from​
DOMInteractor.isDisabled
isReadonly()​
isReadonly(
locator):Promise<boolean>
Defined in: dom-core/dist/index.d.cts:134
Parameters​
locator​
PartLocator
Returns​
Promise<boolean>
Inherited from​
DOMInteractor.isReadonly
isVisible()​
isVisible(
locator):Promise<boolean>
Defined in: dom-core/dist/index.d.cts:135
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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
Throws​
If the element is not found
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