I need to know if there’s a way for selenium rc to capture a screenshot, but instead of saving it as a .png to a specific directory , I want it to be saved in a MySQL database. Is there a simple way like a selenium method that returns an image or a file ? I’m using Java.
Share
You can try with captureScreenshotToString and save the result in the database.
public java.lang.String captureScreenshotToString()
Capture a PNG screenshot. It then returns the file as a base 64 encoded string.
Specified by:
captureScreenshotToString in interface Selenium
Returns:
The base 64 encoded string of the screen shot (PNG file)