Interaction

Left Click

Simulates a left click.

Simulates a left click.

Simulates a left click on a specified web element. Web elements are specified using either CSS or XPath.

TIP

LeftClick(modifierKeys) accepts combined (ORd) ModifierKeys to perform a modifier-click (e.g. Ctrl+Click, Shift+Click, Ctrl+Shift+Click). On Selenium, Alt/Control/Shift/Windows are held via WebDriver Actions for the duration of the click; Application/ScrollLock have no Selenium Actions equivalent and are ignored with a WARNING event.

Examples

GPAL Fluent: High-level fluent C# API

browser.WithSelector(selector).LeftClick() browser.LeftClick(selector) browser.WithSelector(selector).LeftClick(ModifierKeys.Control | ModifierKeys.Shift)

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.LeftClick(string css); GPAL.MagicHelper.LeftClick(string xpath);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.LeftClick(string css).Execute(); browser.PuppeteerClient.LeftClick(string xpath).Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.LeftClick(string css, string sessionId); await browser.PuppeteerCommunicator.LeftClick(string xpath, string sessionId);

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.LeftClick).WithCss(string css).Execute(); GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.LeftClick).WithXPath(string xpath).Execute();