Skip to main content

Class: HTMLTextAreaDriver

Defined in: component-driver-html/src/components/HTMLTextAreaDriver.ts:3

Extends

Constructors

Constructor

new HTMLTextAreaDriver(locator, interactor, option?): HTMLTextAreaDriver

Defined in: component-driver-html/src/components/HTMLTextInputDriver.ts:7

Create a text input driver.

Parameters

locator

PartLocator

interactor

Interactor

option?

Partial<IComponentDriverOption<{ }>>

Returns

HTMLTextAreaDriver

Inherited from

HTMLTextInputDriver.constructor

Properties

commutableOption

readonly commutableOption: IComponentDriverOption<{ }>

Defined in: core/dist/index.d.ts:535

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

HTMLTextInputDriver.commutableOption


interactor

readonly interactor: Interactor

Defined in: core/dist/index.d.ts:526

Inherited from

HTMLTextInputDriver.interactor

Accessors

driverName

Get Signature

get driverName(): string

Defined in: component-driver-html/src/components/HTMLTextAreaDriver.ts:7

Identifier for this driver.

Returns

string

Overrides

HTMLTextInputDriver.driverName


locator

Get Signature

get locator(): PartLocator

Defined in: core/dist/index.d.ts:566

Return the locator of the component

Returns

PartLocator

Inherited from

HTMLTextInputDriver.locator


parts

Get Signature

get parts(): ScenePartDriver<T>

Defined in: core/dist/index.d.ts:562

Return driver instance of all the named parts

Returns

ScenePartDriver<T>

Inherited from

HTMLTextInputDriver.parts

Methods

click()

click(option?): Promise<void>

Defined in: core/dist/index.d.ts:590

Parameters

option?

Partial<ClickOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.click


enforcePartExistence()

protected enforcePartExistence(partName): Promise<void>

Defined in: core/dist/index.d.ts:572

Check the specified parts' existences, and throw MissingPartError 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

readonly never[]

Single or array of the names of the parts to be enforced

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.enforcePartExistence


exists()

exists(): Promise<boolean>

Defined in: core/dist/index.d.ts:589

Whether the component exists/attached to the DOM

Returns

Promise<boolean>

true if the component is attached to the DOM, false otherwise

Inherited from

HTMLTextInputDriver.exists


focus()

focus(option?): Promise<void>

Defined in: core/dist/index.d.ts:599

Parameters

option?

Partial<FocusOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.focus


getAttribute()

getAttribute(attributeName): Promise<Optional<string>>

Defined in: core/dist/index.d.ts:584

Parameters

attributeName

string

Returns

Promise<Optional<string>>

Inherited from

HTMLTextInputDriver.getAttribute


getMissingPartNames()

protected getMissingPartNames(partName): Promise<readonly never[]>

Defined in: core/dist/index.d.ts:578

Get the names of parts not in the DOM

Parameters

partName

readonly never[]

Single or array of the names of the parts to be examined

Returns

Promise<readonly never[]>

Inherited from

HTMLTextInputDriver.getMissingPartNames


getText()

getText(): Promise<Optional<string>>

Defined in: core/dist/index.d.ts:583

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

HTMLTextInputDriver.getText


getValue()

getValue(): Promise<null | string>

Defined in: component-driver-html/src/components/HTMLTextInputDriver.ts:17

Read the value of the input element.

Returns

Promise<null | string>

Inherited from

HTMLTextInputDriver.getValue


hover()

hover(option?): Promise<void>

Defined in: core/dist/index.d.ts:591

Parameters

option?

Partial<HoverOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.hover


innerHTML()

innerHTML(): Promise<string>

Defined in: core/dist/index.d.ts:631

Get the inner HTML of the component

Returns

Promise<string>

The inner HTML of the component

Inherited from

HTMLTextInputDriver.innerHTML


isDisabled()

isDisabled(): Promise<boolean>

Defined in: component-driver-html/src/components/HTMLTextInputDriver.ts:37

Check whether the text input is disabled.

Returns

Promise<boolean>

Inherited from

HTMLTextInputDriver.isDisabled


isReadonly()

isReadonly(): Promise<boolean>

Defined in: component-driver-html/src/components/HTMLTextInputDriver.ts:44

Check whether the text input is read only.

Returns

Promise<boolean>

Inherited from

HTMLTextInputDriver.isReadonly


isVisible()

isVisible(): Promise<boolean>

Defined in: core/dist/index.d.ts:608

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 whether the component is within the viewport.

Returns

Promise<boolean>

true if the component is visible, false otherwise

Inherited from

HTMLTextInputDriver.isVisible


mouseDown()

mouseDown(option?): Promise<void>

Defined in: core/dist/index.d.ts:593

Parameters

option?

Partial<MouseDownOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseDown


mouseEnter()

mouseEnter(option?): Promise<void>

Defined in: core/dist/index.d.ts:597

Parameters

option?

Partial<MouseEnterOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseEnter


mouseLeave()

mouseLeave(option?): Promise<void>

Defined in: core/dist/index.d.ts:598

Parameters

option?

Partial<MouseLeaveOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseLeave


mouseMove()

mouseMove(option?): Promise<void>

Defined in: core/dist/index.d.ts:592

Parameters

option?

Partial<MouseMoveOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseMove


mouseOut()

mouseOut(option?): Promise<void>

Defined in: core/dist/index.d.ts:596

Parameters

option?

Partial<MouseOutOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseOut


mouseOver()

mouseOver(option?): Promise<void>

Defined in: core/dist/index.d.ts:595

Parameters

option?

Partial<HoverOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseOver


mouseUp()

mouseUp(option?): Promise<void>

Defined in: core/dist/index.d.ts:594

Parameters

option?

Partial<MouseUpOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseUp


overriddenParentLocator()

overriddenParentLocator(): Optional<PartLocator>

Defined in: core/dist/index.d.ts:546

Usually this should be undefined as the component driver corresponds to a component nested inside the parent DOM, thus the driver's locator would automatically chain with its parent's locator.

When the component is rendered outside the parent's DOM, which usually happens when the component is a modal or popup, supply the PartLocator on how to locate the component with the component's own locator.

Caution of usage: this function is called before the construction of the driver, so it should not use any instance properties

Returns

Optional<PartLocator>

Inherited from

HTMLTextInputDriver.overriddenParentLocator


overrideLocatorRelativePosition()

overrideLocatorRelativePosition(): Optional<LocatorRelativePosition>

Defined in: core/dist/index.d.ts:558

Usually this should be undefined when the locator is defined by the ScenePart, thus it reflects the natural relative position of the component

However, in some implementation such as MUI v5 dialog, the actual dialog DOM is rendered outside the parent DOM, and the selector is "siblings", by defining this function, it allows the driver to have the knowledge of the actual relative position instead of offloading the knowledge to the consumer.

Caution of usage: this function is called before the construction of the driver, so it should not use any instance properties

Returns

Optional<LocatorRelativePosition>

Inherited from

HTMLTextInputDriver.overrideLocatorRelativePosition


runtimeCssSelector()

runtimeCssSelector(): Promise<string>

Defined in: core/dist/index.d.ts:637

Get the runtime CSS selector of the component. This is useful for debugging and testing purposes.

Returns

Promise<string>

The runtime CSS selector of the component

Inherited from

HTMLTextInputDriver.runtimeCssSelector


setValue()

setValue(value): Promise<boolean>

Defined in: component-driver-html/src/components/HTMLTextInputDriver.ts:29

Set the value of the input, if the input is date, the value should be in the format of 'yyyy-MM-dd'. If the input is time, the value should be in the format of 'HH:mm:'. If the input is datetime-local, the value should be in the format of 'yyyy-MM-ddTHH:mm'.

Parameters

value

Value to be set.

null | string

Returns

Promise<boolean>

Inherited from

HTMLTextInputDriver.setValue


waitUntil()

waitUntil<T>(option): Promise<T>

Defined in: core/dist/index.d.ts:626

Type Parameters

T

T

Parameters

option

WaitUntilOption<T>

Returns

Promise<T>

Inherited from

HTMLTextInputDriver.waitUntil


waitUntilComponentState()

waitUntilComponentState(option?): Promise<void>

Defined in: core/dist/index.d.ts:625

Wait until the component is in the expected state such as the component's visibility or existence. If the component has not reached the expected state within the timeout, it will throw an error.

By default it waits until the component is attached to the DOM within 30 seconds.

Parameters

option?

Partial<Readonly<WaitForOption>>

The option to configure the wait behavior

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.waitUntilComponentState


waitUntilVisible()

waitUntilVisible(timeoutMs?): Promise<void>

Defined in: core/dist/index.d.ts:613

Wait until the component is attached and becomes visible to the DOM.

Parameters

timeoutMs?

number

The number of milliseconds to wait before timing out

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.waitUntilVisible