public IWebDriver Init(string profile, string environment) { NameValueCollection caps = ConfigurationManager.GetSection("capabilities/" + profile) as NameValueCollection; NameValueCollection settings = ConfigurationManager.GetSection("environments/" + environment) as NameValueCollection; DesiredCapabilities capability = new DesiredCapabilities(); foreach (string key in caps.AllKeys) { capability.SetCapability(key, caps[key]); } foreach (string key in settings.AllKeys) { capability.SetCapability(key, settings[key]); } var username = AzureConfig.GetConfig().BrowserStackUser; var accesskey = AzureConfig.GetConfig().BrowserStackKey; capability.SetCapability("browserstack.user", username); capability.SetCapability("browserstack.key", accesskey); capability.SetCapability("project", "das-psrs"); capability.SetCapability("build", "build x.x"); File.AppendAllText("C:\\Users\\Matt\\Desktop\\sf.log", "Starting local"); if (capability.GetCapability("browserstack.local") != null && capability.GetCapability("browserstack.local").ToString() == "true") { browserStackLocal = new Local(); List <KeyValuePair <string, string> > bsLocalArgs = new List <KeyValuePair <string, string> >() { new KeyValuePair <string, string>("key", accesskey) }; browserStackLocal.start(bsLocalArgs); } File.AppendAllText("C:\\Users\\Matt\\Desktop\\sf.log", "Starting driver"); driver = new RemoteWebDriver(new Uri("http://" + ConfigurationManager.AppSettings.Get("BrowserStack.Server") + "/wd/hub/"), capability); return(driver); }
public string GetDBConnectionString() { return(AzureConfig.GetConfig().ConnectionString); }
public TestUser GetViewUser() { return(AzureConfig.GetConfig().ViewAccessUser); }
public TestUser GetEditUser() { return(AzureConfig.GetConfig().EditAccessUser); }
public TestUser GetSuperUser() { return(AzureConfig.GetConfig().SubmitAccessUser); }
public string GetEmployerId() { return(AzureConfig.GetConfig().EmployerId); }