How to perform image based validation using excel

Ask general questions here.
premravi
Posts: 78
Joined: Tue Jan 08, 2019 1:55 pm

How to perform image based validation using excel

Post by premravi » Tue Jun 11, 2019 10:30 am

Hi,
In my application which I am automating there are few elements which are automated based on imaged validation technique,
Please help me to design my script in such a way that I can call image operations also using excel.
(NOTE: click is the only image based operation I am talking about)
Say for instance below is the method to click on an element

public void ClkDataTypes()
{
CompressedImage Element17191_ClickDataTypes = repo.Fusion.Element17191Info.GetClickDataTypes(new Rectangle(24, 23, 63, 14));

Imaging.FindOptions Element17191_ClickDataTypes_Options = Imaging.FindOptions.Default;

repo.Fusion.Element17191.DoubleClick(new Location(Element17191_ClickDataTypes, "19;4", Element17191_ClickDataTypes_Options));
}

How to modify this piece of code in a way that it can be called from excel

Please help me in this issue

Regards

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

Re: How to perform image based validation using excel

Post by odklizec » Tue Jun 11, 2019 10:40 am

Hi,

I'm afraid, there is not enough information available to provide a reasonable answer.
Could you please post the excel file you are talking about? Ideally, create a simple example solution, featuring the excel file and code/actions you want to use, so we can see your repository as well.

Generally speaking, the code looks OK. However, without seeing the excel file and more detailed steps of what exactly you want to achieve, it's impossible to provide a sensible solution. I personally would avoid using image-based operations at any cost. Even rawtext or index-based operations are better options ;) Why do you need to use image-based operations in Excel? I believe it should be possible to access the content of Excel cells? So I don't understand the need of image-based operations in excel?
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

premravi
Posts: 78
Joined: Tue Jan 08, 2019 1:55 pm

Re: How to perform image based validation using excel

Post by premravi » Tue Jun 11, 2019 12:38 pm

Hi,

Yes, I got the point
But there are few elements which does not have raw text and index based if I understood correctly you are referring to co-ordinates which are also failing when I run the same script in desktop or laptop basically in different resolution
If index based is different from co-ordinates then please let me know

So the only option what I left with is image based

Regards

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

Re: How to perform image based validation using excel

Post by odklizec » Tue Jun 11, 2019 12:48 pm

The elements you are referring to are in Excel or in AUT? Please post the excel file and/or snapshot of the AUT, so we can evaluate the UI.
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