Skip to main content

Class: TextAreaDriver

Defined in: component-driver-astryx/src/components/TextAreaDriver.ts:13

Driver for the Astryx TextArea (@astryxdesign/core/TextArea).

TextArea renders a native <textarea> and forwards unknown props (data-testid) onto it, so the scene anchors there directly — value read/write and the linked label come from AstryxFieldInputDriver (getInputValue reads a <textarea>'s value just like an <input>).

Extends​

Constructors​

Constructor​

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

Defined in: component-driver-html/dist/index.d.mts:279

Create a text input driver.

Parameters​

locator​

PartLocator

interactor​

Interactor

option?​

Partial<IComponentDriverOption<{ }>>

Returns​

TextAreaDriver

Inherited from​

AstryxFieldInputDriver.constructor

Accessors​

driverName​

Get Signature​

get driverName(): string

Defined in: component-driver-astryx/src/components/TextAreaDriver.ts:31

Identifier for this driver.

Returns​

string

Overrides​

AstryxFieldInputDriver.driverName

Methods​

getCharCount()​

getCharCount(): Promise<number>

Defined in: component-driver-astryx/src/components/TextAreaDriver.ts:26

The current character count, derived from the value length.

Astryx renders a N/maxLength counter, but reading the value is engine- and version-independent and avoids parsing display chrome.

Returns​

Promise<number>


getRows()​

getRows(): Promise<Optional<number>>

Defined in: component-driver-astryx/src/components/TextAreaDriver.ts:15

The number of visible rows (rows attribute).

Returns​

Promise<Optional<number>>

Inherited members (31)

Properties​

commutableOption​

readonly commutableOption: CommutableComponentDriverOption

Defined in: core/dist/index.d.mts:1182

The component-agnostic slice of the constructor option that is safe to share across the whole driver tree — everything the constructor received EXCEPT the component-specific parts, which each driver owns for itself. Parent drivers pass this straight to the constructors of children they create dynamically (see the list helpers). See CommutableComponentDriverOption.

Inherited from​

AstryxFieldInputDriver.commutableOption


interactor​

readonly interactor: Interactor

Defined in: core/dist/index.d.mts:1172

Inherited from​

AstryxFieldInputDriver.interactor

Accessors​

locator​

Get Signature​

get locator(): PartLocator

Defined in: core/dist/index.d.mts:1229

Return the locator of the component

Returns​

PartLocator

Inherited from​

AstryxFieldInputDriver.locator


parts​

Get Signature​

get parts(): ScenePartDriver<T>

Defined in: core/dist/index.d.mts:1225

Return driver instance of all the named parts

Returns​

ScenePartDriver<T>

Inherited from​

AstryxFieldInputDriver.parts

Methods​

click()​

click(option?): Promise<void>

Defined in: core/dist/index.d.mts:1253

Parameters​
option?​

Partial<ClickOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.click


exists()​

exists(): Promise<boolean>

Defined in: core/dist/index.d.mts:1252

Whether the component exists/attached to the DOM

Returns​

Promise<boolean>

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

Inherited from​

AstryxFieldInputDriver.exists


focus()​

focus(option?): Promise<void>

Defined in: core/dist/index.d.mts:1262

Parameters​
option?​

Partial<FocusOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.focus


getAttribute()​

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

Defined in: core/dist/index.d.mts:1247

Parameters​
attributeName​

string

Returns​

Promise<Optional<string>>

Inherited from​

AstryxFieldInputDriver.getAttribute


getDisabledMessage()​

getDisabledMessage(): Promise<Optional<string>>

Defined in: component-driver-astryx/src/components/AstryxFieldInputDriver.ts:92

The disabledMessage tooltip text, resolved via the control's aria-describedby link to the role="tooltip" layer that isDisabled + disabledMessage renders (the same useTooltip primitive as the standalone Tooltip). undefined when the field isn't in that disabled-with-message state.

Returns​

Promise<Optional<string>>

Inherited from​

AstryxFieldInputDriver.getDisabledMessage


getLabel()​

getLabel(): Promise<Optional<string>>

Defined in: component-driver-astryx/src/components/AstryxFieldInputDriver.ts:31

The field's visible label, resolved via the <label for>↔id link.

Returns the label element's full text. Astryx appends an optional/required marker (" ∙ Optional"/" ∙ Required") inside the same <label>, so when the field is marked optional/required this includes that suffix — read isRequired/isOptional for the state itself. Returns undefined when no associated label exists.

Returns​

Promise<Optional<string>>

Inherited from​

AstryxFieldInputDriver.getLabel


getStatusMessage()​

getStatusMessage(): Promise<Optional<string>>

Defined in: component-driver-astryx/src/components/AstryxFieldInputDriver.ts:69

The status/validation message text, resolved via the control's aria-describedby link to the floating status element.

aria-describedby may list several ids: Astryx points the control at both its description and its status when both are present. The status message is the described element carrying the data-type severity marker (the description is a plain <span id> without it), so each id is resolved and the one with data-type is returned — matching the whole multi-id attribute as a single id would find nothing. Returns undefined when no status is set.

Returns​

Promise<Optional<string>>

Inherited from​

AstryxFieldInputDriver.getStatusMessage


getText()​

getText(): Promise<Optional<string>>

Defined in: core/dist/index.d.mts:1246

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​

AstryxFieldInputDriver.getText


getValue()​

getValue(): Promise<string | null>

Defined in: component-driver-html/dist/index.d.mts:283

Read the value of the input element.

Returns​

Promise<string | null>

Inherited from​

AstryxFieldInputDriver.getValue


hover()​

hover(option?): Promise<void>

Defined in: core/dist/index.d.mts:1254

Parameters​
option?​

Partial<HoverOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.hover


isBusy()​

isBusy(): Promise<boolean>

Defined in: component-driver-astryx/src/components/AstryxFieldInputDriver.ts:54

Whether the field is in a loading state — aria-busy="true" on the control.

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.isBusy


isDisabled()​

isDisabled(): Promise<boolean>

Defined in: component-driver-html/dist/index.d.mts:295

Check whether the text input is disabled.

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.isDisabled


isError()​

isError(): Promise<boolean>

Defined in: component-driver-html/dist/index.d.mts:308

Check whether the text input is in an invalid/error state (signalled by aria-invalid="true").

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.isError


isInvalid()​

isInvalid(): Promise<boolean>

Defined in: component-driver-astryx/src/components/AstryxFieldInputDriver.ts:47

Whether the field is in an invalid/error state — aria-invalid="true" on the control, set when a status of type error is supplied.

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.isInvalid


isReadonly()​

isReadonly(): Promise<boolean>

Defined in: component-driver-html/dist/index.d.mts:299

Check whether the text input is read only.

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.isReadonly


isRequired()​

isRequired(): Promise<boolean>

Defined in: component-driver-astryx/src/components/AstryxFieldInputDriver.ts:39

Whether the field is required — Astryx sets aria-required="true" on the control (the visible " ∙ Required" marker is cosmetic).

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.isRequired


isVisible()​

isVisible(): Promise<boolean>

Defined in: core/dist/index.d.mts:1336

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​

AstryxFieldInputDriver.isVisible


pressKey()​

pressKey(key, option?): Promise<void>

Defined in: core/dist/index.d.mts:1268

Dispatch a keyboard key press on the component. See Interactor.pressKey.

Parameters​
key​

string

A KeyboardEvent.key value, e.g. 'Escape', 'Backspace', 'Enter'

option?​

Partial<PressKeyOption>

Reserved for future modifier-key support

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.pressKey


runtimeCssSelector()​

runtimeCssSelector(): Promise<string>

Defined in: core/dist/index.d.mts:1367

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​

AstryxFieldInputDriver.runtimeCssSelector


scrollIntoView()​

scrollIntoView(): Promise<void>

Defined in: core/dist/index.d.mts:1289

Scroll the component into the viewport. See Interactor.scrollIntoView.

jsdom has no layout engine, so the scroll is a no-op there and behavioral assertions (visibility, offset) are E2E-only.

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.scrollIntoView


setValue()​

setValue(value): Promise<boolean>

Defined in: component-driver-html/dist/index.d.mts:291

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​

string | null

Value to be set.

Returns​

Promise<boolean>

Inherited from​

AstryxFieldInputDriver.setValue


typeText()​

typeText(text): Promise<void>

Defined in: core/dist/index.d.mts:1274

Type text into the component as real per-character keystrokes, inserting at the current caret without clearing. See Interactor.typeText.

Parameters​
text​

string

The literal text to type, one keystroke per character

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.typeText


waitUntil()​

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

Defined in: core/dist/index.d.mts:1356

Type Parameters​
T​

T

Parameters​
option​

WaitUntilOption<T>

Returns​

Promise<T>

Inherited from​

AstryxFieldInputDriver.waitUntil


waitUntilComponentState()​

waitUntilComponentState(option?): Promise<void>

Defined in: core/dist/index.d.mts:1355

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​

AstryxFieldInputDriver.waitUntilComponentState


waitUntilVisible()​

waitUntilVisible(timeoutMs?): Promise<void>

Defined in: core/dist/index.d.mts:1343

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

Parameters​
timeoutMs?​

number

The number of milliseconds to wait before timing out. Defaults to defaultWaitForOption.timeoutMs so this wait shares a single flake-tolerance source with waitUntilComponentState (#1057).

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.waitUntilVisible


overriddenParentLocator()​

static overriddenParentLocator(): Optional<PartLocator>

Defined in: core/dist/index.d.mts:1211

Portal hook: where to re-root this driver's locator when its component renders outside the parent's DOM (a modal, popup, drawer). Return the PartLocator that locates the component from the document root, or undefined (the default) for normal in-tree components whose locator chains from the parent.

This is static because it is per-class metadata read off the constructor before any instance exists — which makes the "no instance state" constraint structural rather than a documented caution. Override with static override.

Returns​

Optional<PartLocator>

Inherited from​

AstryxFieldInputDriver.overriddenParentLocator


overrideLocatorRelativePosition()​

static overrideLocatorRelativePosition(): Optional<LocatorRelativePosition>

Defined in: core/dist/index.d.mts:1221

Portal hook: the locator relative position to apply when the component's real DOM is a sibling/elsewhere rather than a descendant (e.g. a MUI dialog rendered at the document root, located by a "Same"-level selector). Return undefined (the default) to keep the natural position declared by the ScenePart.

Static for the same reason as ComponentDriver.overriddenParentLocator: it is class-level metadata read before construction. Override with static override.

Returns​

Optional<LocatorRelativePosition>

Inherited from​

AstryxFieldInputDriver.overrideLocatorRelativePosition

Protected members (16)

Methods​

activate()​

protected activate(): Promise<void>

Defined in: core/dist/index.d.mts:1282

Activate the component without relying on pointer geometry. See Interactor.activate.

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.activate


contextMenu()​

protected contextMenu(): Promise<void>

Defined in: core/dist/index.d.mts:1278

Dispatch a right-click / contextmenu event on the component. See Interactor.contextMenu.

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.contextMenu


drag()​

protected drag(delta): Promise<void>

Defined in: core/dist/index.d.mts:1320

Drag this component by the given pixel delta from its center. See Interactor.drag.

Prefer a keyboard-driven setValue over a true drag in real drivers — these drag primitives exist only for cases keyboard cannot express (e.g. panning a Lightbox, reordering a column). jsdom has no layout engine, so the positional outcome of the drag is E2E-only there.

Parameters​
delta​

Point

Pixel offset to drag by

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.drag


dragTo()​

protected dragTo(target): Promise<void>

Defined in: core/dist/index.d.mts:1309

Drag this component and drop it onto another component. See Interactor.dragTo.

Prefer a keyboard-driven setValue over a true drag in real drivers — these drag primitives exist only for cases keyboard cannot express (e.g. panning a Lightbox, reordering a column). jsdom has no layout engine, so the positional outcome of the drag is E2E-only there.

Parameters​
target​

ComponentDriver<any>

Another driver whose root element is the drop target

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.dragTo


enforcePartExistence()​

protected enforcePartExistence(partName): Promise<void>

Defined in: core/dist/index.d.mts:1235

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​

AstryxFieldInputDriver.enforcePartExistence


getBoundingRect()​

protected getBoundingRect(): Promise<BoundingRect>

Defined in: core/dist/index.d.mts:1327

Get this component's bounding rectangle. See Interactor.getBoundingRect.

jsdom has no layout engine, so every coordinate and dimension is 0 there; real geometry is E2E-only.

Returns​

Promise<BoundingRect>

Inherited from​

AstryxFieldInputDriver.getBoundingRect


getMissingPartNames()​

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

Defined in: core/dist/index.d.mts:1241

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​

AstryxFieldInputDriver.getMissingPartNames


innerHTML()​

protected innerHTML(): Promise<string>

Defined in: core/dist/index.d.mts:1361

Get the inner HTML of the component

Returns​

Promise<string>

The inner HTML of the component

Inherited from​

AstryxFieldInputDriver.innerHTML


mouseDown()​

protected mouseDown(option?): Promise<void>

Defined in: core/dist/index.d.mts:1256

Parameters​
option?​

Partial<MouseDownOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseDown


mouseEnter()​

protected mouseEnter(option?): Promise<void>

Defined in: core/dist/index.d.mts:1260

Parameters​
option?​

Partial<MouseEnterOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseEnter


mouseLeave()​

protected mouseLeave(option?): Promise<void>

Defined in: core/dist/index.d.mts:1261

Parameters​
option?​

Partial<MouseLeaveOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseLeave


mouseMove()​

protected mouseMove(option?): Promise<void>

Defined in: core/dist/index.d.mts:1255

Parameters​
option?​

Partial<MouseMoveOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseMove


mouseOut()​

protected mouseOut(option?): Promise<void>

Defined in: core/dist/index.d.mts:1259

Parameters​
option?​

Partial<MouseOutOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseOut


mouseOver()​

protected mouseOver(option?): Promise<void>

Defined in: core/dist/index.d.mts:1258

Parameters​
option?​

Partial<HoverOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseOver


mouseUp()​

protected mouseUp(option?): Promise<void>

Defined in: core/dist/index.d.mts:1257

Parameters​
option?​

Partial<MouseUpOption>

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.mouseUp


scrollBy()​

protected scrollBy(delta): Promise<void>

Defined in: core/dist/index.d.mts:1298

Scroll the component by the given pixel delta. See Interactor.scrollBy.

jsdom has no layout engine, so the scroll is a no-op there and behavioral assertions (resulting offset) are E2E-only.

Parameters​
delta​

Point

Pixel offset to scroll by

Returns​

Promise<void>

Inherited from​

AstryxFieldInputDriver.scrollBy