Highlighted
Absent Member.. Absent Member..
Absent Member..
176 views

Compare Images

Jump to solution

Is there any other way to compare a downloaded image (during the test) with an image from local folder besides Mercury.FileCompare? Because you don't have always the same resolution, for example if I run the test on a different computer, the downloaded image during the test wiill not be the same.

 

Thank you

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Compare Images

Jump to solution

Hi Andrei,

 

I hope you have a nice day!

 

Regarding your question, have you try using the bitmap checkpoint? If not I recommend to check on the UFT help the

"Bitmap Options Section" there you will find alot of information of how to compare images.

 

 

“Regards,

Oscar Mendoza| SW Technical Support Consultant.
Functional Testing
Hewlett-Packard (SSO Portal)


If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.”

View solution in original post

0 Likes
2 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Compare Images

Jump to solution

Hi Andrei,

 

I hope you have a nice day!

 

Regarding your question, have you try using the bitmap checkpoint? If not I recommend to check on the UFT help the

"Bitmap Options Section" there you will find alot of information of how to compare images.

 

 

“Regards,

Oscar Mendoza| SW Technical Support Consultant.
Functional Testing
Hewlett-Packard (SSO Portal)


If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.”

View solution in original post

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Compare Images

Jump to solution

Hi Andrei,

 

 

      Additional to bitmap checkpoint I would suggest also the following.

      Is possible for you to capture images from different resolutions then  compare the image downloaded during test execution with the different images already saved from different resolutions. 

 

     Or you can capture the screen resolution using the sample below and then chose the corresponding image according to the resolution and compare it with the one downloaded in the test execution.

 

     Sample:

     

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") 
Set ResItems = objWMIService.ExecQuery("Select * from Win32_DesktopMonitor",,48)

For Each objItem in ResItems
    MyH = objItem.ScreenHeight
    MyW = objItem.ScreenWidth
Exit for Next

 

 

The sample will return the height and width of the main monitor, the "exit for" is to ensure that only the main monitor resolution will be store in the variables.

With that you can make a Select case statement to choose the image and make the comparison.

All that would be base on the same have a group of images already store from different resolutions

 


HP support
If you find this useful, mark Kudos.
Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

 

DISCLAIMER OF WARRANTY
The example software is experimental and is provided as a courtesy, free of charge, "AS-IS" by Hewlett-Packard Development Company, L.P. ("HP"). HP shall have no obligation to maintain or support this software. HP MAKES NO EXPRESS OR IMPLIED WARRANTY OF ANY KIND REGARDING THIS SOFTWARE. HP SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON CONTRACT, TORT OR ANY OTHER LEGAL THEORY, IN CONNECTION WITH OR ARISING OUT OF THE FURNISHING, PERFORMANCE OR USE OF THIS SOFTWARE

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.