How to use remote session setting object to declare the capabilities in Selenium 4.0.0?

How to use remote session setting object to declare the capabilities in selenium 4.0.0

Hi Tom,

You can use the following code snippet to declare the capabilities in Selenium 4.0.0 using remote session setting object:

Dictionary<string, object> ltOptions = new Dictionary<string, object>();
ltOptions.Add("build", "your build name");
ltOptions.Add("name", "your test name");
ltOptions.Add("platformName", "Windows 10");
ltOptions.Add("browserName", "Chrome");
ltOptions.Add("browserVersion", "93.0");

RemoteSessionSettings options = new RemoteSessionSettings();
options.AddMetadataSetting("LT:Options", ltOptions);

RemoteWebDriver driver = new RemoteWebDriver(new Uri("https://"+ username + ":" + accesskey + "@hub.lambdatest.com/wd/hub" ), options);