Compare logos on pages
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compare logos on pages
We have 40 institutions websites that must display 1 of the 3 approved logos. Additionally, they have 2 pages on their website to place the logo. So what that means is we have to check both known locations for the 1 of the 3 different possible logos and mark them in-compliant only if a logo doesn't display on one of the 2 pages.
To begin with, not sure how to compare the images. We have the 3 logo images on our website. Can 3 separate checkpoints be used to compare and still only log 1 error message if none exist on either page?
Can 3 different IF Objects be utilized in a loop to check for the 3 logos?
Not sure of the best way to proceed.
Is there a way to compare images from 1 website to another or can the images from our website be stored in the keyword test and then compared to the institution websites for 1 o exist?
I am still an intermediate level TestComplete user and I have not been successful in setting up this keyword test.
Any help will be appreciated!
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can first add in those three approved logos into the Stores test item as a region artifact.
then you would essentially be looping through those 40 websites, and do either a region checkpoint or the compare pictures operation https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/checkpoints/compare-pictur... in order to raise warnings/errors as needed.
you can have the region checkpoint, or the compare operation to grab the on screen logo (object) and compare it against the Stores item (containing the actual logo). Now iterating through the 40 websites sounds like a for or while loop, and check the two different on screen object locations for the three different approved logos sound like an if or try/catch statement.
Justin Kim
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will give this a try! Thanks. I will will let you know how it comes out.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, the location on the webpage can be anywhere. I was having some difficulty with searching the entire page for the logo object.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you hkim5 for such valid advice!
@ppfeifer Did you get the chance to test out this approach yet?
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added them to the stores. When I did a compare, I had to give a location on the page. The logo is not in a fixed location on the page. It can be anywhere. So I was trying a different approach, make each logo a variable and check on the alias browser/page and use the if object is visible. I couldn't figure out how to do it with the picture compare and region checkpoint.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Wamboo @Marsha_R @abishekhari007 @tristaanogre your advice would be greatly appreciated🙂
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe something like this
have variables for FoundLogo1, FoundLogo2, FoundLogo3 all set to zero (start state = no logo found)
for page = 1 to 2
look for logos
if logo found
compare to saved logos, if match, set matching variable to 1
after both pages checked, if FoundLogo1 + FoundLogo2 + FoundLogo3 >= 2, then logos pass, else logos fail
For searching for the logos, do they have a distinct file type like .png or something? Maybe do a FindChild or something similar for that file type starting at the top of the page.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
They are a image:
<img src="/documents/111597/1813862/FS_WebBanner_FLCatalog_700x100_2020.png/80e2755e-9c61-baa7-4679-8b274f55708f?t=1594737041457">
That is one of them that I am looking for,
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, I see in there that it's a .png file. Take a look at that image with Object Spy on one of those webpages and post the results here please.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
