Forum Discussion

whuang's avatar
whuang
Regular Contributor
5 years ago

How can I check the web content that are not from the same object?

Hello,

 

I used the checkpoint wizard to add a checkpoint to check the test credit card information inside the blue block at the bottom right of my screenshot below. However, if I used the checkpoint wizard to read the whole block, it returned me the blue object (Panel("widget")), which includes some text (highlighted in orange) only show in certain scenarios, otherwise these text are hidden. I tried to use the checkpoint wizard to narrow down the checking area, but it was either the whole block or line by line, like "Visa ending with 3339", "Name on Card".

 

What I want to check if the everything visible in the block, like the test credit card information and the "Remove" button. I don't want the hidden text if it is not visible. So I trace down all the visible text in the block, and I noticed that they are from different objects, highlighted in different colors for different objects in the screenshot below.

 

So do I have to create 3 checkpoints here to check the text information because they are from 3 different objects? Is there a way I can check all of them in 1 checkpoint? Also is there anyway I can add a screenshot action in the checkpoint?

Thanks!

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    If you don't want the hidden text, then you need to check each object individually.

    • whuang's avatar
      whuang
      Regular Contributor

      Thanks tristaanogre , is there anyway I can add a screenshot action in a checkpoint?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Not necessarily for successful ones.  That would be where you'd need to just call Log.Picture to log a screenshot manually.  For unsuccessful ones (that log an error), there is a setting to grab the screen on an logged error.  Tools | Current Project Properties | Playback "Post image on error"

    • whuang's avatar
      whuang
      Regular Contributor

      I tried image checkpoint to verify the content, but sometimes it passed, sometimes it failed with 1% pixel difference and 100% color diferrence running on the same browser, how can the difference be that big for the color? I don't see any color difference when compare the pictures manually. Also, if I grab the image checkpoint from one browser, and then run the test on different browsers, is it highly going to fail the check?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I wouldn't go with an image checkpoint at all.  I only use image checkpoints if there is no other option.  In this case, you DO have other options.