Skip to content

Variable: fillByXPath()

ts
const fillByXPath: (ctx: Context, selector: string, value: string, options?: FillOptions) => Promise<void> = fill;

Defined in: src/keyboard/index.ts:325

Type a value into a form field, replacing existing text.

Parameters

ParameterTypeDescription
ctxContextContext object.
selectorstringCSS selector.
valuestringText to type into the field.
options?FillOptionsFill behavior: delay, blur, maxTries, retryDelay.

Returns

Promise<void>

Remarks

Fire an event for each character. To keep the existing text, use type.

Example

ts
// Fill in a login username
await fill(ctx, '#username', 'rocketman_42');

Deprecated

Use fill instead.

Type a value into a form field by XPath, replacing existing text.

Param

Context object.

Param

XPath selector.

Param

Text to type into the field.

Matterway Assistant SDK Documentation