Skip to main content

Class: HTMLTextAreaDriver

@atomic-testing/component-driver-html.HTMLTextAreaDriver

Hierarchy

Constructors

constructor

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

Parameters

NameType
locatorPartLocator
interactorInteractor
option?Partial<IComponentDriverOption<>>

Returns

HTMLTextAreaDriver

Inherited from

HTMLTextInputDriver.constructor

Defined in

component-driver-html/src/components/HTMLTextInputDriver.ts:4

Properties

commutableOption

Readonly commutableOption: IComponentDriverOption<>

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

Defined in

core/build/src/drivers/ComponentDriver.d.ts:19


interactor

Readonly interactor: Interactor

Inherited from

HTMLTextInputDriver.interactor

Defined in

core/build/src/drivers/ComponentDriver.d.ts:10

Accessors

driverName

get driverName(): string

Returns

string

Overrides

HTMLTextInputDriver.driverName

Defined in

component-driver-html/src/components/HTMLTextAreaDriver.ts:4


locator

get locator(): PartLocator

Return the locator of the component

Returns

PartLocator

Inherited from

HTMLTextInputDriver.locator

Defined in

core/build/src/drivers/ComponentDriver.d.ts:50


parts

get parts(): ScenePartDriver<T>

Return driver instance of all the named parts

Returns

ScenePartDriver<T>

Inherited from

HTMLTextInputDriver.parts

Defined in

core/build/src/drivers/ComponentDriver.d.ts:46

Methods

click

click(option?): Promise<void>

Parameters

NameType
option?Partial<ClickOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.click

Defined in

core/build/src/drivers/ComponentDriver.d.ts:74


enforcePartExistence

enforcePartExistence(partName): Promise<void>

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

NameTypeDescription
partNamereadonly never[]Single or array of the names of the parts to be enforced

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.enforcePartExistence

Defined in

core/build/src/drivers/ComponentDriver.d.ts:56


exists

exists(): Promise<boolean>

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

Defined in

core/build/src/drivers/ComponentDriver.d.ts:73


focus

focus(option?): Promise<void>

Parameters

NameType
option?Partial<FocusOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.focus

Defined in

core/build/src/drivers/ComponentDriver.d.ts:83


getAttribute

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

Parameters

NameType
attributeNamestring

Returns

Promise<Optional<string>>

Inherited from

HTMLTextInputDriver.getAttribute

Defined in

core/build/src/drivers/ComponentDriver.d.ts:68


getMissingPartNames

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

Get the names of parts not in the DOM

Parameters

NameTypeDescription
partNamereadonly never[]Single or array of the names of the parts to be examined

Returns

Promise<readonly never[]>

Inherited from

HTMLTextInputDriver.getMissingPartNames

Defined in

core/build/src/drivers/ComponentDriver.d.ts:62


getText

getText(): Promise<Optional<string>>

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

Defined in

core/build/src/drivers/ComponentDriver.d.ts:67


getValue

getValue(): Promise<null | string>

Returns

Promise<null | string>

Inherited from

HTMLTextInputDriver.getValue

Defined in

component-driver-html/src/components/HTMLTextInputDriver.ts:11


hover

hover(option?): Promise<void>

Parameters

NameType
option?Partial<HoverOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.hover

Defined in

core/build/src/drivers/ComponentDriver.d.ts:75


isDisabled

isDisabled(): Promise<boolean>

Returns

Promise<boolean>

Inherited from

HTMLTextInputDriver.isDisabled

Defined in

component-driver-html/src/components/HTMLTextInputDriver.ts:28


isReadonly

isReadonly(): Promise<boolean>

Returns

Promise<boolean>

Inherited from

HTMLTextInputDriver.isReadonly

Defined in

component-driver-html/src/components/HTMLTextInputDriver.ts:32


isVisible

isVisible(): Promise<boolean>

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

HTMLTextInputDriver.isVisible

Defined in

core/build/src/drivers/ComponentDriver.d.ts:92


mouseDown

mouseDown(option?): Promise<void>

Parameters

NameType
option?Partial<MouseDownOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseDown

Defined in

core/build/src/drivers/ComponentDriver.d.ts:77


mouseEnter

mouseEnter(option?): Promise<void>

Parameters

NameType
option?Partial<MouseEnterOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseEnter

Defined in

core/build/src/drivers/ComponentDriver.d.ts:81


mouseLeave

mouseLeave(option?): Promise<void>

Parameters

NameType
option?Partial<MouseLeaveOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseLeave

Defined in

core/build/src/drivers/ComponentDriver.d.ts:82


mouseMove

mouseMove(option?): Promise<void>

Parameters

NameType
option?Partial<MouseMoveOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseMove

Defined in

core/build/src/drivers/ComponentDriver.d.ts:76


mouseOut

mouseOut(option?): Promise<void>

Parameters

NameType
option?Partial<MouseOutOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseOut

Defined in

core/build/src/drivers/ComponentDriver.d.ts:80


mouseOver

mouseOver(option?): Promise<void>

Parameters

NameType
option?Partial<HoverOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseOver

Defined in

core/build/src/drivers/ComponentDriver.d.ts:79


mouseUp

mouseUp(option?): Promise<void>

Parameters

NameType
option?Partial<MouseUpOption>

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.mouseUp

Defined in

core/build/src/drivers/ComponentDriver.d.ts:78


overriddenParentLocator

overriddenParentLocator(): Optional<PartLocator>

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

Defined in

core/build/src/drivers/ComponentDriver.d.ts:30


overrideLocatorRelativePosition

overrideLocatorRelativePosition(): Optional<LocatorRelativePosition>

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

Defined in

core/build/src/drivers/ComponentDriver.d.ts:42


setValue

setValue(value): Promise<boolean>

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

NameTypeDescription
valuenull | stringValue to be set.

Returns

Promise<boolean>

Inherited from

HTMLTextInputDriver.setValue

Defined in

component-driver-html/src/components/HTMLTextInputDriver.ts:23


waitUntil

waitUntil(option?): Promise<void>

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

NameTypeDescription
option?Partial<Readonly<WaitForOption>>The option to configure the wait behavior

Returns

Promise<void>

Inherited from

HTMLTextInputDriver.waitUntil

Defined in

core/build/src/drivers/ComponentDriver.d.ts:104