public IAutomationBrowser CreateBrowser(ISweetPotatoSettings sweetPotatoSettings) { ScenarioContext.Current.Set(sweetPotatoSettings.GetExecutingAssemblyName(), Constants.ImplementingAssemblyName); ScenarioContext.Current.Set(sweetPotatoSettings.GetWaitTimeMilliseconds(), Constants.WaitTimeMilliseconds); ScenarioContext.Current.Set(sweetPotatoSettings.IsElementHighlighterEnabled(), Constants.IsElementHighlighterEnabled); switch (sweetPotatoSettings.GetDriverType()) { case DriverType.Selenium: var automationBrowser = GetSeleniumBrowser(sweetPotatoSettings); SetAutomationBrowserToScenarioContext(automationBrowser); return(automationBrowser); default: var seleniumBrowser = GetSeleniumBrowser(sweetPotatoSettings); SetAutomationBrowserToScenarioContext(seleniumBrowser); return(seleniumBrowser); } }
public TimeSpan GetElementWaitTimeSpan() { var waitTimeMilliseconds = _sweetPotatoSettings.GetWaitTimeMilliseconds(); return(new TimeSpan(0, 0, 0, 0, Convert.ToInt16(waitTimeMilliseconds))); }