Example #1
0
        public void SetUpForEveryTestMethod()
        {
            ReportHelper.AddTestMethodMetadataToReport(TestContext.CurrentContext);
            var webDriver = TestContext.Parameters["WebDriverType"];

            WebDriverType = String.IsNullOrEmpty(webDriver) ? WebDriverType.Local : (WebDriverType)Enum.Parse(typeof(WebDriverType), webDriver);
            var browser = TestContext.Parameters["Browser"];

            BrowserType = String.IsNullOrEmpty(browser) ? BrowserType.Chrome : (BrowserType)Enum.Parse(typeof(BrowserType), browser);
            Driver      = WebDriverFactory.CreateDriver(WebDriverType, BrowserType, TestContext.CurrentContext);
        }
Example #2
0
        public virtual void BeforeEachMethod()
        {
            var categories = GetCategories();

            ReportHelper.AddTestMethodMetadataToReport(TestContext.CurrentContext, categories);

            Driver.Init();

            PageFactory.Init();

            Driver.GoToUrl(FW.Settings.Test.BaseUrl);
        }