public void TeardownTest() { //Close the Browser : EndTest AutomatedBrowser.TearDown(); TestReport.GenerateReport(); AutomatedLogger.Log("Main Test: Teardown Tests"); }
public void TestCommons_Setup(string automationConfigs) { AutomatedLogger.Log("Entering the Common Setup method"); //Read the Test Configs (including the ones in app.config) TestConfigs.Init(automationConfigs); ApplicationConfigs.ReadConfigs(TestConfigs.PathOfCurrentContext); //Start a new Browser : Initialize ActiveBrowser = new AutomatedBrowser(TestConfigs.Browser, isGridEnabled: false); //Open Website in the browser started by Selenium if (!string.IsNullOrEmpty(TestConfigs.Url)) { AutomatedActions.NavigationActions.NavigateToUrl(TestConfigs.Url); // Login //WindowsLogin(); AutomatedActions.WindowActions.Maximize(); } AutomatedLogger.Log("Exiting Common Setup method"); }//end method Common Setup
public void TeardownTest() { //Close the Browser AutomatedBrowser.TearDown(); //Finalize and generate the report AutomationReport.GenerateTestReport(); AutomatedLogger.Log("TestMain: TeardownTest"); }
/// <summary> /// Open the application url specified in the configs. /// Must be called after initializing the configs. /// </summary> public void OpenApplication() { AutomatedLogger.Log("OpenApplication: Go to the application url provided in the configs"); //Start a new Browser : Initialize ActiveBrowser = new AutomatedBrowser(TestConfigs.Browser, isGridEnabled: false); //Open Website in the browser started by Selenium if (!string.IsNullOrEmpty(TestConfigs.Url)) { AutomatedActions.NavigationActions.NavigateToUrl(ActiveBrowser.WebDriverInstance, TestConfigs.Url); AutomatedActions.WindowActions.Maximize(ActiveBrowser.WebDriverInstance); } AutomatedLogger.Log("Exiting OpenApplication"); }//end method Common Setup