| || |
Per the documentation this method returns "The base 64 encoded string of the page screenshot (PNG file)"
At first glance it looks correct. However, when I load up what should be an identical .png file (taken back to back with the toString SS) and encode it using the Base64 class, the two strings are not equal.
I converted them to a byte array using the Base64 class for a much smaller comparison and the two arrays are just a couple characters off.
This seems to conclude that the Base64 encoder Selenium's captureEntirePageToString() uses is either out of date or using a different library?
Any info/discussion is appreciated. I can post some sample code later if anyone wants
I just noticed I'm getting different results for the byte array every time. I guess the Base64 decode method is pretty dynamic (it returns the byte array).
I want to compare these two strings. Theoretically if the captureEntirePageToString() just encodes to Base64, the two strings should be the same.
Each implementation of Base64 are different. I'm using the Sun implementation... there are the apache implementation too.
The string will change if yours screen-shot are different. If the same image the strings should be equals.