Table of Contents

Class EvaluateCommandParameters

Namespace
WebDriverBiDi.Script
Assembly
WebDriverBiDi.dll

Provides parameters for the script.evaluate command.

public class EvaluateCommandParameters : CommandParameters<EvaluateResult>
Inheritance
EvaluateCommandParameters
Inherited Members

Constructors

EvaluateCommandParameters(string, Target, bool)

Initializes a new instance of the EvaluateCommandParameters class.

public EvaluateCommandParameters(string expression, Target scriptTarget, bool awaitPromise)

Parameters

expression string

The expression to evaluate.

scriptTarget Target

The target of the script to evaluate against.

awaitPromise bool

true to await the script evaluation as a Promise; otherwise, false.

Properties

AwaitPromise

Gets or sets a value indicating whether a Promise returned by the script is awaited. The script is always evaluated to completion; when this is true and the result is a Promise, its settled value is returned in place of the Promise itself.

[JsonPropertyName("awaitPromise")]
public bool AwaitPromise { get; set; }

Property Value

bool

Expression

Gets or sets the expression to evaluate.

[JsonPropertyName("expression")]
public string Expression { get; set; }

Property Value

string

MethodName

Gets the method name of the command.

[JsonIgnore]
public override string MethodName { get; }

Property Value

string

ResultOwnership

Gets or sets the value of the model of ownership of the handles of the values in the script.

[JsonPropertyName("resultOwnership")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ResultOwnership? ResultOwnership { get; set; }

Property Value

ResultOwnership?

ScriptTarget

Gets or sets the target against which to evaluate the script.

[JsonPropertyName("target")]
public Target ScriptTarget { get; set; }

Property Value

Target

SerializationOptions

Gets or sets the serialization options for serializing results.

[JsonPropertyName("serializationOptions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SerializationOptions? SerializationOptions { get; set; }

Property Value

SerializationOptions

UserActivation

Gets or sets a value indicating whether the evaluation is treated as user-activated, as though the user had interacted with the page, which APIs gated on a user gesture require. When omitted, is treated as if false.

[JsonPropertyName("userActivation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? UserActivation { get; set; }

Property Value

bool?