I'd recommend exporting both as a CSV and go line by line and compare the two. Secondly: write a driver that compares the information in those spreadsheets to verify integrity (and you can take hashes of that information) of the document, rather than verifying the files on a bitwise level. It's almost (but not quite) axiomatic that if the hashes for two files are different, then those files are also different. Since the driver for Excel is quite different from the driver that selenium uses, especially given compression and other alterations/optimizations that may be made to the file by selenium, then - of course - the hash is going to be different.įirstly: Pull up the file in diff and find out what is different between those two files. (Not always, but don't worry about that.) If so much as one bit is added, removed, or moved from the document, on the bitwise level, then the hash of that file will be completely different. However, given the nature of Excel spreadsheets. Public Function ToUTF8(ByVal Text As String) As Byte() Accepts a String of UTF16 ('Unicode') text and returns a Byte array in UTF8 encoding. The ramifications of this are that when you're comparing a file with integrity constraints on the bitwise level, then a hashing function works perfectly. Public Function MD5(ByRef Data() As Byte) As Byte() Calculates the MD5 hash of the provided data in the form of a Byte array and returns it as a Byte array. When it comes to hashing functions, when you're verifying the integrity of a file, you're verifying that at the bit level, the files are the same. People use hashing functions to verify the integrity of a file, stream, or other resource. But the MD5 hash value generated for both files are coming different. I manually checked both the files, both are exactly the same. One is directly downloaded from the browser and another is downloaded using selenium driver. I have two excel files saved at different locations.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |