sdk.automation.click
Home > @matterway/sdk > Automation > click
Automation.click() function
Clicks on an element.
Signature:
export declare function click(ctx: Context, selector: string, options?: WaitForSelectorOptions): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
selector | string | Css selector. |
options | WaitForSelectorOptions | (Optional) |
Returns:
Promise<void>
Remarks
Also sends related events, such as mouseenter
.
Example
await click(ctx, 'button[id="submit"]');