Пример #1
0
        public static void GivenTheAutomationDriverHasStartedUsingConfigurationSpecifiedInAppConfig()
        {
            var automationBrowserFactory = new AutomationBrowserFactory();
            var sweetPotatoSettings      = new AppConfigSweetPotatoSettings();

            var automationBrowser = automationBrowserFactory.CreateBrowser(sweetPotatoSettings);

            ScenarioContext.Current.Set(automationBrowser, Constants.AutomationBrowserKey);
        }
Пример #2
0
        public void GivenIHaveStartedTheBrowserUsingTheDriver(BrowserType browserType, DriverType driverType)
        {
            var sweetPotatoSettings      = new CustomSweetPotatoSettings(browserType, driverType);
            var automationBrowserFactory = new AutomationBrowserFactory();

            var automationBrowser = automationBrowserFactory.CreateBrowser(sweetPotatoSettings);

            ScenarioContext.Current.Set(automationBrowser, Constants.AutomationBrowserKey);
        }
Пример #3
0
        public static void GivenIHaveStartedTheBrowserUsingTheDriver(string browserType, string driverType)
        {
            var browserTypeEnum = (BrowserType)Enum.Parse(typeof(BrowserType), browserType);
            var driverTypeEnum  = (DriverType)Enum.Parse(typeof(DriverType), driverType);

            var sweetPotatoSettings      = new DefaultAppConfigSettings(browserTypeEnum, driverTypeEnum);
            var automationBrowserFactory = new AutomationBrowserFactory();

            var automationBrowser = automationBrowserFactory.CreateBrowser(sweetPotatoSettings);

            ScenarioContext.Current.Set(automationBrowser, "AutomationBrowserKey");
        }