docs: Update C# examples to the new changes to desired caps
MODIFY
commands-yml/commands/session/create.yml
commands-yml/commands/session/create.yml
@@ -78,14 +78,14 @@ example_usage:
// TODO PHP sample
csharp:
|
- DesiredCapabilities capabilities = new DesiredCapabilities();
- capabilities.SetCapability(MobileCapabilityType.PlatformName, "Android");
- capabilities.SetCapability(MobileCapabilityType.PlatformVersion, "7.1.1");
- capabilities.SetCapability(MobileCapabilityType.DeviceName, "Android Device");
- capabilities.SetCapability("appPackage", "com.instagram.android");
- capabilities.SetCapability("appActivity", "com.instagram.android.activity.MainTabActivity");
+ AppiumOptions capabilities = new AppiumOptions();
+ appiumOptions.AddAdditionalCapability(MobileCapabilityType.PlatformName, "Android");
+ appiumOptions.AddAdditionalCapability(MobileCapabilityType.PlatformVersion, "7.1.1");
+ appiumOptions.AddAdditionalCapability(MobileCapabilityType.DeviceName, "Android Device");
+ appiumOptions.AddAdditionalCapability("appPackage", "com.instagram.android");
+ appiumOptions.AddAdditionalCapability("appActivity", "com.instagram.android.activity.MainTabActivity");
- AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new Uri("http://127.0.0.1:4723/"), capabilities);
+ AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new Uri("http://127.0.0.1:4723/"), appiumOptions);
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/server/DefaultSession.html#createSession-org.openqa.selenium.remote.server.DriverFactory-org.openqa.selenium.remote.server.Clock-org.openqa.selenium.remote.SessionId-org.openqa.selenium.Capabilities-"

docs: Update C# examples to the new changes to desired caps (#13739)