Table of Contents

Class SetTouchOverrideCommandParameters

Namespace
WebDriverBiDi.Emulation
Assembly
WebDriverBiDi.dll

Provides parameters for the emulation.setTouchOverride command.

public class SetTouchOverrideCommandParameters : CommandParameters<SetTouchOverrideCommandResult>
Inheritance
SetTouchOverrideCommandParameters
Inherited Members

Constructors

SetTouchOverrideCommandParameters()

Initializes a new instance of the SetTouchOverrideCommandParameters class.

public SetTouchOverrideCommandParameters()

Properties

Contexts

Gets the browsing contexts for which to set the touch override.

[JsonIgnore]
public List<string> Contexts { get; }

Property Value

List<string>

Remarks

The protocol requires this property, when present, to contain at least one entry. An empty list therefore means "not specified": the property is omitted from the JSON payload entirely, and an empty array is never sent. Add entries to the list to scope the command.

The two scopes are mutually exclusive: a command that names both browsing contexts and user contexts is rejected by the remote end with an invalid argument error. Scope the command one way or the other.

MaxTouchPoints

Gets or sets the emulated maximum number of touch points for the browser. When null, clears the override.

[JsonPropertyName("maxTouchPoints")]
[SpecRange(1, Infinity)]
public ulong? MaxTouchPoints { get; set; }

Property Value

ulong?

Remarks

Valid values for this property are greater than or equal to 1. This property does not validate its value; a value outside this range is sent as-is, and a conforming remote end rejects it when the command is executed.

MethodName

Gets the method name of the command.

[JsonIgnore]
public override string MethodName { get; }

Property Value

string

ResetTouchOverride

Gets a pre-initialized instance of SetTouchOverrideCommandParameters with the MaxTouchPoints property set to null to clear any existing touch override. Returns a new instance on each access to allow for modification of the properties without affecting other uses. Functionally equivalent to using the parameterless constructor, but provided as a named property to make the intent of clearing the override more explicit in code that uses this property.

public static SetTouchOverrideCommandParameters ResetTouchOverride { get; }

Property Value

SetTouchOverrideCommandParameters

UserContexts

Gets the user contexts for which to set the touch override.

[JsonIgnore]
public List<string> UserContexts { get; }

Property Value

List<string>

Remarks

The protocol requires this property, when present, to contain at least one entry. An empty list therefore means "not specified": the property is omitted from the JSON payload entirely, and an empty array is never sent. Add entries to the list to scope the command.

The two scopes are mutually exclusive: a command that names both browsing contexts and user contexts is rejected by the remote end with an invalid argument error. Scope the command one way or the other.