sdk.automation.getvaluebyxpath
Home > @matterway/sdk > Automation > getValueByXpath
Automation.getValueByXpath() function
Returns the value of a form element by XPath.
Signature:
export declare function getValueByXpath(ctx: Context, selector: string): Promise<string | null>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
selector | string | The element XPath selector for which to return value. The value of the form element as a string. |
Returns:
Promise<string | null>
Example
const clientEmail = await getValueByXpath(ctx, '//input[@id="email"]');