Screenshot and API comparsion

Ask general questions here.
User avatar
Posts: 3
Joined: Wed Oct 23, 2019 8:44 am
Location: Prague

Screenshot and API comparsion

Post by Celahir » Wed Oct 23, 2019 9:11 am


first of all - i am kinda beginner in automatizations, and i am still exploring Ranorex in Trial. Working for small company, and waiting for management to decide if they have any solid reason for purchasing a license. Everything so far so good yet, but...

1.) I didn't found out, how to compare two screenshots taken in frontend with 30ms delay - need to test if animation of elecricity on map is going well, and IS NOT static, so if comparsion similarity = false, it's the desired result. But how to compare?

2.) Does Ranorex have any API tool? Like... If i need GET some response on Backend, which i need partially compare with previous response or example response? E.g. i need to compare only some lines which i need to be static, because others are relative/dynamic/changing, like i need to compare ONLY lines 11,15,125,126,127,303,etc..? (And vice versa) How can i do that?

I would appreciate any link, if this is already solved somewhere. I tried to find by myself, but i am almost running out of time..
Thank you very much in advance! :)

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

Re: Screenshot and API comparsion

Post by odklizec » Thu Oct 24, 2019 7:52 am


Ranorex is built on .Net with full support for C# and VB .Net. So you can write almost anything you want with it, if you know how ;) You can find Ranorex API here:
Unfortunately, Ranorex API documentation is currently somewhat poor, with no or pretty minimal samples. So the best you can do, is to search this forum, where you can find a LOT of samples and already solved coding problems.

Unfortunately, your problems appear to be very app-specific, so it may be hard to suggest something reliable and easy to follow.

As for comparing screenshots, you can do this either from recordings (which is probably not what you are looking for) or code. You can find many image-related code samples at this forum. Check for example these: ... 16&p=34076 ... 15&p=55049 ... 16&p=53102

As for the other problem, how do you access the backend and what's the output (plain file, xml, csv,...)?
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