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;
}
Maybe it has to do with your internet settings, try this:
Tools > Internet Options… > Security tab, Enable Protected Mode
checkbox is at the bottom of the tab.
Read this on https://groups.google.com/forum/?fromgroups#!topic/selenium-users/6eRU4HIXFfs