private static string BuildBaseUrl(AppAlias app) { var appName = app.GetDescription(); var environment = GatekeeperSettingManager.GetAppsetting(SettingName.ENVIRONMENT); //var churchCode = GatekeeperSettingManager.GetAppsetting(SettingName.CHURCHCODE); var baseUrl = string.Empty; if (app == AppAlias.Membership_AUI) { baseUrl = string.Format("https://memberui-vip.{0}.aw.dev.activenetwork.com", environment); } //if (environment == "proc") //{ // if (app != AppAlias.Unkonw) // { // baseUrl = string.Format("https://{0}.fellowshipone.com", appName); // } //} //else //{ // if (app != AppAlias.Unkonw) // { // baseUrl = string.Format("https://{0}.{1}.fellowshipone.com", appName, environment); // } //} return(baseUrl.ToLower()); }
static WebElementKeeper() { _timeoutInterval = TimeSpan.FromSeconds(30); int conifgInterval; if (int.TryParse(GatekeeperSettingManager.GetAppsetting(SettingName.WAITTIMEOUTINTERVAL), out conifgInterval)) { _timeoutInterval = TimeSpan.FromSeconds(conifgInterval); } }
/// <summary> /// /// </summary> /// <returns></returns> public static IDriverManager CreateDriverManager() { var browser = GatekeeperSettingManager.GetAppsetting(SettingName.BROWSER); var driverPath = GatekeeperSettingManager.GetAppsetting(SettingName.DRIVERPATH); if (string.IsNullOrEmpty(browser)) { throw new Exception(string.Format("Can not get config '{0}'", SettingName.BROWSER)); } IWebDriver driver; switch (browser.ToLower()) { case "*iexplore": case "*ie": driver = new InternetExplorerDriver(driverPath); break; case "*firefox": var options = new FirefoxOptions(); driver = new FirefoxDriver(); break; case "*chrome": driver = new ChromeDriver(driverPath); break; default: throw new Exception("Create driver failed!"); } var manager = new WebDriverManager(driver); return(manager); }