Table of Contents

Class Touchscreen

Namespace
PuppeteerSharp.Input
Assembly
PuppeteerSharp.dll

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public class Touchscreen : ITouchscreen
Inheritance
Touchscreen
Implements

Constructors

Touchscreen(CDPSession, Keyboard)

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public Touchscreen(CDPSession client, Keyboard keyboard)

Parameters

client CDPSession
keyboard Keyboard

Methods

TapAsync(decimal, decimal)

Dispatches a touchstart and touchend event.

public Task TapAsync(decimal x, decimal y)

Parameters

x decimal

The touch X location.

y decimal

The touch Y location.

Returns

Task

Task.

See Also

TouchEndAsync()

/// Dispatches a touchendt event.

public Task TouchEndAsync()

Returns

Task

A Task that resolves when the message was confirmed by the browser.

TouchMoveAsync(decimal, decimal)

Dispatches a touchmove event.

public Task TouchMoveAsync(decimal x, decimal y)

Parameters

x decimal

The touch X location.

y decimal

The touch Y location.

Returns

Task

A Task that resolves when the message was confirmed by the browser.

TouchStartAsync(decimal, decimal)

Dispatches a touchstart event.

public Task TouchStartAsync(decimal x, decimal y)

Parameters

x decimal

The touch X location.

y decimal

The touch Y location.

Returns

Task

A Task that resolves when the message was confirmed by the browser.