Compare while recording image and saved file

Class library usage, coding and language questions.
JorisS
Posts: 14
Joined: Wed Nov 22, 2017 11:30 am

Compare while recording image and saved file

Post by JorisS » Mon Oct 15, 2018 11:17 am

Hello,

Creating a new post because I haven't found in the exemples here something similar.

Is there a way to get the name of a screenshot while recording ?

If my question is not clear I am trying to do something like this:
I have this screenshot of a graph saved manually with Ranorex (Save Screenshot...) which is my reference.
When running the test, I want to get the image that is at the same position and compare it with my reference to check if they are the same.

Any idea ?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Compare while recording image and saved file

Post by odklizec » Mon Oct 15, 2018 11:25 am

Hi,

Please check this post...
loading-image-from-a-project-in-user-co ... tml#p33970
It shows how to validate a repository element with ref. image.

Eventually, check these examples:
https://www.ranorex.com/help/latest/han ... imagesibri
https://www.ranorex.com/help/latest/han ... automation
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

JorisS
Posts: 14
Joined: Wed Nov 22, 2017 11:30 am

Re: Compare while recording image and saved file

Post by JorisS » Mon Oct 15, 2018 4:17 pm

Thank you for your answer.

Can I convert this freshly captured repository item to bitmap ?

JorisS
Posts: 14
Joined: Wed Nov 22, 2017 11:30 am

Re: Compare while recording image and saved file

Post by JorisS » Tue Oct 16, 2018 8:57 am

Ok I found
CaptureDesktopImage(Element)
which seems to be what I'm looking for