Class AddPreloadScriptCommandParameters
- Namespace
- WebDriverBiDi.Script
- Assembly
- WebDriverBiDi.dll
Provides parameters for the script.addPreloadScript command.
public class AddPreloadScriptCommandParameters : CommandParameters<AddPreloadScriptCommandResult>
- Inheritance
-
AddPreloadScriptCommandParameters
- Inherited Members
Constructors
AddPreloadScriptCommandParameters(string)
Initializes a new instance of the AddPreloadScriptCommandParameters class.
public AddPreloadScriptCommandParameters(string functionDeclaration)
Parameters
functionDeclarationstringThe function declaration defining the preload script.
Properties
Arguments
Gets the arguments for the function declaration.
[JsonIgnore]
public List<ChannelValue> Arguments { get; }
Property Value
Remarks
This property is optional in the protocol, and omitting it has the same meaning as sending an empty array. An empty list therefore means "not specified": the property is omitted from the JSON payload entirely. Add entries to the list to populate it.
Contexts
Gets the browsing contexts for which to add the preload script.
[JsonIgnore]
public List<string> Contexts { get; }
Property Value
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.
FunctionDeclaration
Gets or sets the function declaration defining the preload script.
[JsonPropertyName("functionDeclaration")]
public string FunctionDeclaration { get; set; }
Property Value
MethodName
Gets the method name of the command.
[JsonIgnore]
public override string MethodName { get; }
Property Value
Sandbox
Gets or sets the sandbox name of the preload script.
[JsonPropertyName("sandbox")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Sandbox { get; set; }
Property Value
UserContexts
Gets the user contexts for which to add the preload script.
[JsonIgnore]
public List<string> UserContexts { get; }
Property Value
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.