public T CaptureScreenShot <T>(T exception) where T : Exception
        {
            var path = Path.Combine(Path.GetTempPath(), string.Format("{0}_{2}_{1}.png", sessionTitle, screenshotIndex++, StripIllegalChars(exception.Message)));

            WebDriver.CaptureScreenShot(path);
            return(exception);
        }
 public void CaptureScreenShot(string path = null)
 {
     if (string.IsNullOrWhiteSpace(path))
     {
         path = Path.Combine(Path.GetTempPath(), string.Format("{0}_{1}.png", sessionTitle, screenshotIndex++));
     }
     WebDriver.CaptureScreenShot(path);
 }