Does anyone have experience with running Selenium C# tests in Browserstack. Trying out this example from the Browserstack, but I can´t seem to get the test to the Test explorer in Visual Studio. Not sure why I´m not able to execute the test. Any ideas? I´m having no problems running my local test in Visual Studio.
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();
}
}
}