Table of Contents

Class SetUserAgentOverrideCommandSettings

Namespace
OpenQA.Selenium.DevTools.V148.Emulation
Assembly
Selenium.WebDriver.dll

Allows overriding user agent with the given string. userAgentMetadata must be set for Client Hint headers to be sent.

public sealed class SetUserAgentOverrideCommandSettings : ICommand
Inheritance
SetUserAgentOverrideCommandSettings
Implements
Inherited Members

Properties

AcceptLanguage

Browser language to emulate.

[JsonPropertyName("acceptLanguage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? AcceptLanguage { get; set; }

Property Value

string

CommandName

Gets the name of the command.

[JsonIgnore]
public string CommandName { get; }

Property Value

string

Platform

The platform navigator.platform should return.

[JsonPropertyName("platform")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Platform { get; set; }

Property Value

string

UserAgent

User agent to use.

[JsonPropertyName("userAgent")]
public string UserAgent { get; set; }

Property Value

string

UserAgentMetadata

To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData

[JsonPropertyName("userAgentMetadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public UserAgentMetadata? UserAgentMetadata { get; set; }

Property Value

UserAgentMetadata