Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public bool IsElementHighlighterEnabled()
 {
     return(_sweetPotatoSettings.IsElementHighlighterEnabled());
 }