Webdriver and Image Verification

Can you verify image if loaded on webpage?

 Yes! You can verify but you cannot say that images are half loaded. To verify if image is correct then there would be some other method but code will tell you just that images are loaded on page or not.

You can send http request to that source using GET method and check the status code as 200. if that the case then your image downloaded properly and image is there. 

Please drop your comments if you think if I am missing anything.

Date
Categories
Tags
Permalink
Status

6 Comments

  1. Anand Somani
    Posted October 9, 2012 at 8:32 AM | Permalink

    I want to capture “Months of Supply” report from below URL
    http://www.tableausoftware.com/learn/gallery/real-estate-prices

    Please let me know is it possible? and how?

    • admin
      Posted October 10, 2012 at 12:00 AM | Permalink

      Anand, its not possible to verify as far as I know for now. you can verify till “region-content” as its AJAX.

  2. Rama Sharma
    Posted October 12, 2012 at 4:39 AM | Permalink

    Can we compare/verify the content of downloaded pdf?

    • admin
      Posted October 12, 2012 at 7:01 AM | Permalink

      Nope! selenium can read only HTML DOM.

  3. Posted October 29, 2012 at 3:46 PM | Permalink

    HI everyone,
    Regarding verification of the downloaded pdf content, i would like to share my current working with you guys,.Well i am writing the automation framework with MySQL support in selenium RC java now a days.I also have to find the solution where we can compare or verify the downloaded pdf content with our verification points. . So after thinking a lot and studying the selenium API, i come to the decision that we need to introduce a parser here with the help of some java code which can help in the situation. Well i am not sure if it works or not, I am still under progress of some kind of POC. You can also think on these lines. May be this will resolve your problem.

    • admin
      Posted November 1, 2012 at 8:18 PM | Permalink

      I am kind of agree with you but we should keep in mind that verifying image or pdf is not under scope of Selenium but programming language whatever we are using.

Leave a Reply

%d bloggers like this: