Clicks on an element by XPath.
Context object.
XPath selector.
Optional
Also sends related events, such as mouseenter.
mouseenter
await clickByXPath(ctx, '//button[@id= "my-button"]'); Copy
await clickByXPath(ctx, '//button[@id= "my-button"]');
Clicks on an element by XPath.