Hello! At this moment i need to automate some tests cases to my company, and i have the Ranorex 2.1.1.6334 version.
I need to compare 2 images of a graphic but that version don't have the hotkeys or the Image Based Validation. So i need some help. I tried the latest version 2.2 demo which features were available.Unfortunatlly i have to work on Ranorex version 2.1.1.6334. Can somebody help me?
How can i validate a image to compare with other one?Only by using code?How?
Ranorex didn't known the form like a .bmp?
When I record and try to validate the image Ranorex doesn't provide me the image validation and only validate the element with this path: /form[@controlname='TactChart']/container/container[@controlname='_togglePanel']/tabpagelist/tabpage[@controlname='_tabPageGraph']/container[@controlname='_zedGraphControl']
How can i do the code to compare with another image?if it´s possible
I tried this snipets:
Bitmap bmp = Ranorex.Imaging.Load(@"/form[@controlname='TactChart']/container/container[@controlname='_togglePanel']/tabpagelist/tabpage[@controlname='_tabPageGraph']/container[@controlname='_zedGraphControl']");
myRepo.WinFormsApp.Self.Click(MouseButtons.Right,bmp);
and i have 3 erros on the second line: CS1519
Images Comparison on 2.1.1.6334 version
Images Comparison on 2.1.1.6334 version
Last edited by Enjoy on Thu Apr 15, 2010 10:29 am, edited 1 time in total.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Images Comparison on 2.1.1.6334 version
Hi!
There is a possible way, but you have to write your own method to compare two images.
You can catch a bmp file with ranorex with following code
"System.ArgumentException: Failed to load bitmap from file......"
Regards,
Peter
Ranorex Support Team
In Version 2.1 there is no compare method available. The method is implemented in Ranorex 2.2Enjoy wrote: How can i validate a image to compare with other one?Only by using code?How?
There is a possible way, but you have to write your own method to compare two images.
You can catch a bmp file with ranorex with following code
Bitmap bmp1 = Imaging.CaptureImage("yourElement"); //Image changes or do some actions Bitmap bmp2 = Imaging.CaptureImage("yourElement"); YouCompareMethod(bmp1,bmp2);But as I said to compare you have to write your own method, or u upgrade to Ranorex 2.2, this version provide a compare method for images.
Will not work because you have to load a image and not an element path!Enjoy wrote:Ranorex.Imaging.Load(@"/form[@controlname='TactChart']/container/container[@controlname='_togglePanel']/tabpagelist/tabpage[@controlname='_tabPageGraph']/container[@controlname='_zedGraphControl']");
Ranorex.Imaging.Load("C:\my.bmp")When you execute your code, normally you will get follwoing Excepetion:
"System.ArgumentException: Failed to load bitmap from file......"
Regards,
Peter
Ranorex Support Team