コード例 #1
0
 public void Quit()
 {
     driver.Close();
     driver.Quit();
     driver.Dispose();
     driver = null;
 }
コード例 #2
0
 public void Quit()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
     {
         var fileName = TestContext.CurrentContext.TestDirectory + "\\" +
                        DateTime.Now.ToString("yy-MM-dd-HH-mm-ss-FFF") + "-" + GetType().Name + "-" +
                        TestContext.CurrentContext.Test.FullName + "." + ScreenshotImageFormat.Jpeg;
         try
         {
             ((ITakesScreenshot)driver).GetScreenshot().SaveAsFile(fileName, ScreenshotImageFormat.Jpeg);
             TestContext.AddTestAttachment(fileName);
         }
         catch (Exception e)
         {
             Console.WriteLine(e);
         }
     }
     driver.Close();
     driver.Quit();
     driver.Dispose();
     driver = null;
 }
コード例 #3
0
 public void Cleanup()
 {
     driver.Quit();
     driver.Dispose();
 }
コード例 #4
0
 public void CloseDriver()
 {
     m_driver.Dispose();
     WebDriver = null;
 }