Skip to content

Instantly share code, notes, and snippets.

@testingbot
Created October 27, 2020 14:13
Show Gist options
  • Save testingbot/4dd1adc370621bbb8874a68a082770cf to your computer and use it in GitHub Desktop.
Save testingbot/4dd1adc370621bbb8874a68a082770cf to your computer and use it in GitHub Desktop.
csharp example capabilities
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.iOS;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium.Support.UI;
namespace TestingBotAppiumSingleTest
{
class MainClass
{
public static void Main(string[] args)
{
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("key", "key");
caps.SetCapability("secret", "secret");
caps.SetCapability("version", "9.0");
caps.SetCapability("browserName", "chrome");
caps.SetCapability("realDevice", true);
caps.SetCapability("platformName", "Android");
caps.SetCapability("deviceName", "Galaxy S10");
IWebDriver driver = new RemoteWebDriver(
new Uri("https://hub.testingbot.com/wd/hub/"), caps
);
driver.Navigate().GoToUrl("http://www.google.com/ncr");
Console.WriteLine(driver.Title);
driver.Quit();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment