Class SetForcedColorsModeThemeOverrideCommandParameters
- Namespace
- WebDriverBiDi.Emulation
- Assembly
- WebDriverBiDi.dll
Provides parameters for the emulation.setForcedColorsModeThemeOverride command.
public class SetForcedColorsModeThemeOverrideCommandParameters : CommandParameters<SetForcedColorsModeThemeOverrideCommandResult>
- Inheritance
-
SetForcedColorsModeThemeOverrideCommandParameters
- Inherited Members
Constructors
SetForcedColorsModeThemeOverrideCommandParameters()
Initializes a new instance of the SetForcedColorsModeThemeOverrideCommandParameters class.
public SetForcedColorsModeThemeOverrideCommandParameters()
Properties
Contexts
Gets the browsing contexts for which to set the forced colors mode theme override.
[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.
MethodName
Gets the method name of the command.
[JsonIgnore]
public override string MethodName { get; }
Property Value
ResetForcedColorsModeThemeOverride
Gets a pre-initialized instance of SetForcedColorsModeThemeOverrideCommandParameters with the Theme property set to null to clear any existing forced colors mode theme 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 SetForcedColorsModeThemeOverrideCommandParameters ResetForcedColorsModeThemeOverride { get; }
Property Value
Theme
Gets or sets the emulated color theme mode for the browser. When null, clears the override.
[JsonPropertyName("theme")]
public ForcedColorsModeTheme? Theme { get; set; }
Property Value
UserContexts
Gets the user contexts for which to set the forced colors mode theme override.
[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.