|
This should be closed in favour of Here is a patch that modifies selenium to add an API method for capturing a screenshot and returning it as a string which is a base64 encoded png file. This uses the Robot class to capture the current screen. The API method is called captureScreenshotToString. I closed My reasons: Read my comments in Code has been commited to subversion for this patch: Remaining task is add some documentation to the wiki on how to use the new feature. Happy captureScreenshottingToFile, everyone! It says this is fixed in beta 1 but I get an error when calling the command. I tried the nightly snapshot and that is hosed. when trying to run it. How can I add just this functionality to beta 1 (i am not a java dev, perl/php, never compiled a jar) Changed fix version until release of 1.0 only part of the nightly builds available at http://release.openqa.org/cgi-bin/selenium-remote-control-redirect.zip Resolved by Erik Beans, patch submitted by Jason Huggins Would someone post a code snippet showing how to save the base64 to a file? Be sure to include this in the updated docs too. Thanks for this btw! In Java: import java.io.File String screenshotString = selenium.captureEntirePageScreenshotToString(""); |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Err when I said mime encoded I meant base 64 encoded. Brain wrong.