How to declare capabilities in Selenium 4.0.0 with xUnit to run the test on LambdaTest?

Can you please confirm on how I can declare capabilities in Selenium 4.0.0 when I use xUnit to run the test on LambdaTest?

Hello Mark,

You need to use the below code block to pass OS browser combination:

Dictionary<string, object> ltOptions = new Dictionary<string, object>();
            ltOptions.Add("build", "your build name");
            ltOptions.Add("name", "your test name");
            ltOptions.Add("platformName", os);
            ltOptions.Add("browserName", browser);
            ltOptions.Add("browserVersion",version);

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

For further reference, please go through the following URL:

https://github.com/shub22396/XUNIT-WITH-SELENIUM-4.0.git