sdk.automation.clickbytext
Home > @matterway/sdk > Automation > clickByText
Automation.clickByText() function
Clicks an element by its text content.
Signature:
export declare function clickByText(ctx: Context, text: string, filterOptions?: FilterOptions): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | |
text | string | Text to be clicked on. |
filterOptions | FilterOptions | (Optional) Filter the XPath selector. |
Returns:
Promise<void>
Example
await clickText(page, 'Save and submit');