I need some help when it comes to taking a screenshot in visual studio 2015 using selenium and C#. I keep getting an error message when running the code below.
Screenshot ss = ((ITakesScreenshot)driver).GetScreenshot();
ss.SaveAsFile(@"C:\Temp\Download\Image.png",
ScreenshotImageFormat.Png);
The error message I get is "System.Runtime.InteropServices.ExternalExcepton: A generic error occurred in GDI+"
If anyone is currently able to take screenshots, please let me know if you are doing anything differently.