Have a read of this:
and then a look at this:
What you want is the downloadImage method in FileDownloader.java
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/J4SpDafZ0wgJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
Hi Kishore,The following code is c/p'ed out of a solution that works for me (c#):Screenshot ss = ((ITakesScreenshot)webdriver).GetScreenshot();Directory.CreateDirectory(path);
string screenshot = ss.AsBase64EncodedString;
byte[] ssBytes = ss.AsByteArray;ss.SaveAsFile((string.Format("{0}\\{1}{2}", path, fileName, ".jpeg")), ImageFormat.Jpeg);Where path is simply the path to the desired folder, e.g.private readonly string path = @"C:\MyWebdriverScreenshots";