Created
October 27, 2020 14:13
-
-
Save testingbot/4dd1adc370621bbb8874a68a082770cf to your computer and use it in GitHub Desktop.
csharp example capabilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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