Webdriver does not provide direct any function to image verification, but we can verify images by taking two screenshots of the whole web page using TakeScreenshot WebDriver function, one at script creation time and another at execution time.
I have created a sample script in which first I captured a Google home page screen shot and saved (input.jpg)
into my project, another screen shot (output.jpg)
captured on the same page at test execution time and saved into the project. I want to compare both the images if they are not same then test script will fail.
How should I apply logic in image verification using selenium?