Beispiel #1
0
        public Browser(WebDriverfactory webDriverfactory, TestRunConfiguration testRunConfiguration)
        {
            this.webDriverfactory = webDriverfactory;

            if (!FeatureContext.Current.TryGetValue(out webDriver))
            {
                if (FeatureContext.Current.FeatureInfo.Tags.Contains("BrowserSafari"))
                {
                    testRunConfiguration.BrowserType = "Safari";
                }

                else if (FeatureContext.Current.FeatureInfo.Tags.Contains("BrowserFirefox"))
                {
                    testRunConfiguration.BrowserType = "firefox";
                }

                else
                {
                    testRunConfiguration.BrowserType = "chrome";
                }

                CreateWebDriver();
                FeatureContext.Current.Set(webDriver);
            }

            this.baseUrl            = testRunConfiguration.BaseURL;
            AssertUITimeout.Browser = this;
        }
Beispiel #2
0
 public WebDriverfactory(TestRunConfiguration testRunConfiguration)
 {
     this.testRunConfiguration = testRunConfiguration;
 }