public void CloseBroser()
 {
     driver.Close();
     driver.Quit();
     driver.Dispose();
     driver = null;
 }
示例#2
0
        public void AfterTest()
        {
            File.CreateText(_Evidence.GenerateTxtLogPath(_testContext.CurrentTestOutcome.ToString(), _Scenario_Name, _UserStory));

            switch (navegador)
            {
            case BrowserType.InternetExplorer:
                browser.Close();
                //Reporter.GenerateReport();
                SDK.Cleanup();
                break;

            case BrowserType.Chrome:
                if (driver == null)
                {
                    return;
                }
                driver.Close();
                driver = null;
                break;
            }
        }
示例#3
0
 /// <summary>
 /// Handles the command.
 /// </summary>
 /// <param name="driver">The driver used to execute the command.</param>
 /// <param name="locator">The first parameter to the command.</param>
 /// <param name="value">The second parameter to the command.</param>
 /// <returns>The result of the command.</returns>
 protected override object HandleSeleneseCommand(OpenQA.Selenium.IWebDriver driver, string locator, string value)
 {
     driver.Close();
     return(null);
 }
示例#4
0
 public void TestTearDown()
 {
     Driver.Close();
     Driver.Quit();
 }
示例#5
0
 public static void CloseBrowser()
 {
     driver.Close();
 }