Is there anyone who has used Browserstack to run Selenium C# tests? I'm trying out this example from the Browserstack, but I can't seem to get the test into Visual Studio's Test Explorer. I'm not sure why I'm unable to run the test. Do you have any suggestions? In Visual Studio, I have no issues executing my local test.
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
namespace SeleniumTest
{
class Program
{
static void Main(string[] args)
{
IWebDriver driver;
DesiredCapabilities capability = DesiredCapabilities.Chrome();
capability.SetCapability("browserName", "iPad");
capability.SetCapability("platform", "MAC");
capability.SetCapability("device", "undefined");
capability.SetCapability("browserstack.user", "");
capability.SetCapability("browserstack.key", "");
driver = new RemoteWebDriver(
new Uri("http://hub-cloud.browserstack.com/wd/hub/"), capability
);
driver.Navigate().GoToUrl("http://www.google.com");
Console.WriteLine(driver.Title);
IWebElement query = driver.FindElement(By.Name("q"));
query.SendKeys("Browserstack");
query.Submit();
Console.WriteLine(driver.Title);
driver.Quit();
}
}
}