Class: TextFieldDriver
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:58
A driver for the Material UI v5 TextField component with single line or multiline text input.
Extends
ComponentDriver
<typeofparts
>
Implements
IInputDriver
<string
|null
>
Constructors
Constructor
new TextFieldDriver(
locator
,interactor
,option
?):TextFieldDriver
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:59
Parameters
locator
PartLocator
interactor
Interactor
option?
Partial
<IComponentDriverOption
<{ }>>
Returns
TextFieldDriver
Overrides
ComponentDriver<typeof parts>.constructor
Properties
commutableOption
readonly
commutableOption:IComponentDriverOption
<{helperText
: {driver
: typeofHTMLElementDriver
;locator
:CssLocator
; };label
: {driver
: typeofHTMLElementDriver
;locator
:CssLocator
; };multilineInput
: {driver
: typeofHTMLTextInputDriver
;locator
:CssLocator
; };nativeSelectInputDetect
: {driver
: typeofHTMLElementDriver
;locator
:CssLocator
; };richSelectInputDetect
: {driver
: typeofHTMLElementDriver
;locator
:CssLocator
; };selectInput
: {driver
: typeofSelectDriver
;locator
:CssLocator
; };singlelineInput
: {driver
: typeofHTMLTextInputDriver
;locator
:CssLocator
; }; }>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:20
Option passed to the constructor includes both universal options which can be shared across all component driver tree, and component specific options which are only applicable to the component.
Commutable option is the option that can be shared across all component driver tree.
Inherited from
ComponentDriver.commutableOption
interactor
readonly
interactor:Interactor
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:11
Inherited from
ComponentDriver.interactor
Accessors
driverName
Get Signature
get driverName():
string
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:148
Returns
string
Overrides
ComponentDriver.driverName
locator
Get Signature
get locator():
PartLocator
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:51
Return the locator of the component
Returns
PartLocator
Inherited from
ComponentDriver.locator
parts
Get Signature
get parts():
ScenePartDriver
<T
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:47
Return driver instance of all the named parts
Returns
ScenePartDriver
<T
>
Inherited from
ComponentDriver.parts
Methods
click()
click(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:75
Parameters
option?
Partial
<ClickOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.click
enforcePartExistence()
protected
enforcePartExistence(partName
):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:57
Check the specified parts' existences, and throw MissPartError if any of the part is found not existence. Existence is defined by the part's existence in the DOM regardless of its visibility on the screen
Parameters
partName
Single or array of the names of the parts to be enforced
"singlelineInput"
| "multilineInput"
| "label"
| "helperText"
| "selectInput"
| "richSelectInputDetect"
| "nativeSelectInputDetect"
| readonly ("singlelineInput"
| "multilineInput"
| "label"
| "helperText"
| "selectInput"
| "richSelectInputDetect"
| "nativeSelectInputDetect"
)[]
Returns
Promise
<void
>
Inherited from
ComponentDriver.enforcePartExistence
exists()
exists():
Promise
<boolean
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:74
Whether the component exists/attached to the DOM
Returns
Promise
<boolean
>
true if the component is attached to the DOM, false otherwise
Inherited from
ComponentDriver.exists
focus()
focus(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:84
Parameters
option?
Partial
<FocusOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.focus
getAttribute()
getAttribute(
attributeName
):Promise
<Optional
<string
>>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:69
Parameters
attributeName
string
Returns
Promise
<Optional
<string
>>
Inherited from
ComponentDriver.getAttribute
getHelperText()
getHelperText():
Promise
<Optional
<string
>>
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:117
Returns
Promise
<Optional
<string
>>
getLabel()
getLabel():
Promise
<Optional
<string
>>
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:113
Returns
Promise
<Optional
<string
>>
getMissingPartNames()
protected
getMissingPartNames(partName
):Promise
<readonly ("singlelineInput"
|"multilineInput"
|"label"
|"helperText"
|"selectInput"
|"richSelectInputDetect"
|"nativeSelectInputDetect"
)[]>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:63
Get the names of parts not in the DOM
Parameters
partName
Single or array of the names of the parts to be examined
"singlelineInput"
| "multilineInput"
| "label"
| "helperText"
| "selectInput"
| "richSelectInputDetect"
| "nativeSelectInputDetect"
| readonly ("singlelineInput"
| "multilineInput"
| "label"
| "helperText"
| "selectInput"
| "richSelectInputDetect"
| "nativeSelectInputDetect"
)[]
Returns
Promise
<readonly ("singlelineInput"
| "multilineInput"
| "label"
| "helperText"
| "selectInput"
| "richSelectInputDetect"
| "nativeSelectInputDetect"
)[]>
Inherited from
ComponentDriver.getMissingPartNames
getText()
getText():
Promise
<Optional
<string
>>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:68
Get the combined text content of the component
Returns
Promise
<Optional
<string
>>
If the component exists and has content, it should return the text or otherwise undefined
Inherited from
ComponentDriver.getText
getValue()
getValue():
Promise
<null
|string
>
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:89
Returns
Promise
<null
| string
>
Implementation of
IInputDriver.getValue
hover()
hover(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:76
Parameters
option?
Partial
<HoverOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.hover
innerHTML()
innerHTML():
Promise
<string
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:116
Get the inner HTML of the component
Returns
Promise
<string
>
The inner HTML of the component
Inherited from
ComponentDriver.innerHTML
isDisabled()
isDisabled():
Promise
<boolean
>
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:124
Returns
Promise
<boolean
>
isReadonly()
isReadonly():
Promise
<boolean
>
Defined in: packages/component-driver-mui-v6/src/components/TextFieldDriver.ts:136
Returns
Promise
<boolean
>
isVisible()
isVisible():
Promise
<boolean
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:93
Whether the component is visible. Visibility is defined
that the component does not have the CSS property display: none
,
visibility: hidden
, or opacity: 0
. However this does not
check wether the component is within the viewport.
Returns
Promise
<boolean
>
true if the component is visible, false otherwise
Inherited from
ComponentDriver.isVisible
mouseDown()
mouseDown(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:78
Parameters
option?
Partial
<MouseDownOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.mouseDown
mouseEnter()
mouseEnter(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:82
Parameters
option?
Partial
<MouseEnterOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.mouseEnter
mouseLeave()
mouseLeave(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:83
Parameters
option?
Partial
<MouseLeaveOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.mouseLeave
mouseMove()
mouseMove(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:77
Parameters
option?
Partial
<MouseMoveOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.mouseMove
mouseOut()
mouseOut(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:81
Parameters
option?
Partial
<MouseOutOption
>
Returns
Promise
<void
>
Inherited from
ComponentDriver.mouseOut
mouseOver()
mouseOver(
option
?):Promise
<void
>
Defined in: packages/core/build/src/drivers/ComponentDriver.d.ts:80
Parameters
option?
Partial
<HoverOption
>