sdk.automation.fill
Home > @matterway/sdk > Automation > fill
Automation.fill() function
Types the value into a form field, replacing the existing text.
Signature:
export declare function fill(ctx: Context, selector: string, value: string): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
selector | string | Css selector. |
value | string | A text to type into field. |
Returns:
Promise<void>
Remarks
Triggers an event for each character. If you want to keep the existing text, use the helper "type".
Example
await fill(ctx, 'input', 'Hello');