Hi I am not able to capture the screen shot using selenium webdriver . I get "Unable to get window (NoSuchDriver)".It works fine with Firefox. I tried running on User1 then it ran well but when I switched to another User ie(User2) switching User then I get this error
public string TakeScreenshot(IWebDriver driver, string SnapFolderPath, string TCID, string KeyFunction)
{
ITakesScreenshot ssdriver = driver as ITakesScreenshot;
Screenshot screenshot = ssdriver.GetScreenshot();
string filePath = SnapFolderPath + "\\" + TCID + "_" + KeyFunction + "_" + GetDateTimeforFilePath() + ".bmp";
screenshot.SaveAsFile(filePath, ImageFormat.Png);
return filePath;
}