Image Validation and capturing Mouse Pointer actions.

Ranorex Studio, Spy, Recorder, and Driver.
girish
Posts: 4
Joined: Fri Jan 14, 2011 9:33 pm

Image Validation and capturing Mouse Pointer actions.

Post by girish » Fri Jan 14, 2011 9:52 pm

Hi all,
I am newbee to Ranorex and been evaluating it from few days. Following are the issues I have been facing:
(1) Image Validation: For some or the other reason, I have to set similarity to 0.95 and 0.5-0.6 for tool tips. Or else the recording fails.
(2) Image Validation: Sometimes recording successfully passes even if the actual image is different than the screenshot. For example in the attachment
I have a big image which I need to validate.
During play back I tried validating the image with tool bar on the image (**whereas the actual screen shot while recording does not contain the tool bar on the image) the validation passes for the complete Rectangular area selected for the image.
Expected Behavior: Recording should fail, as the actual image is not same as the recorded.
(3) How do I record "Mouse Pointer" actions? For example the pointer changes to a Hand symbol...How do I capture this?

Thank You
-G

girish
Posts: 4
Joined: Fri Jan 14, 2011 9:33 pm

Re: Image Validation and capturing Mouse Pointer actions.

Post by girish » Fri Jan 14, 2011 10:42 pm

I forgot to ask on more thing: Can I get help with code to generate random unrepeatitive "Key sequence"
(4) How to generate Random unrepeatitive key sequence?
Thank You
-G

User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

Re: Image Validation and capturing Mouse Pointer actions.

Post by slavikf » Sat Jan 15, 2011 1:54 am

girish wrote:Hi all,
I am newbee to Ranorex and been evaluating it from few days. Following are the issues I have been facing:
(1) Image Validation: For some or the other reason, I have to set similarity to 0.95 and 0.5-0.6 for tool tips. Or else the recording fails.
I found, that any values, other then 1.0 works somewhat unpredictable...
So, for my tests i use only 1.0, which is exact same image (pixel to pixel)
Are you sure, that there is a reason not to use 1.0?

girish
Posts: 4
Joined: Fri Jan 14, 2011 9:33 pm

Re: Image Validation and capturing Mouse Pointer actions.

Post by girish » Mon Jan 17, 2011 4:29 pm

slavikf wrote:
girish wrote:Hi all,
I am newbee to Ranorex and been evaluating it from few days. Following are the issues I have been facing:
(1) Image Validation: For some or the other reason, I have to set similarity to 0.95 and 0.5-0.6 for tool tips. Or else the recording fails.
I found, that any values, other then 1.0 works somewhat unpredictable...
So, for my tests i use only 1.0, which is exact same image (pixel to pixel)
Are you sure, that there is a reason not to use 1.0?
@ Slavikf:
values, other then 1.0 works somewhat unpredictable...?
Well for my application it works fine for anything in the range 0.8 to 0.95. Depends up on what images are captured.
My Recordings fails for similarity=1. But, passes for 0.5 to 0.95. And as per my understanding if your recording works with similarity (default)=1.0 you are good to go. My recording fails at 1.0 because of difference in exact "Pixel Captured while recording" to the "Pixels found on play back"...
Somebody correct me if wrong ;)
-G

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Image Validation and capturing Mouse Pointer actions.

Post by Support Team » Mon Jan 17, 2011 5:44 pm

ad (3) It’s not possible to record this. However, you can validate it in code. The Ranorex Mouse object has a CursorName property that you can use to validate it. So, you just need a user code item in the recording where you check the value of Mouse.CursorName.

ad (4) You'll have to write some user code for that. The .NET Framework provides the Random class to create random numbers. You can convert them to chars and concatenate them to form random strings. Then you can use these generated random strings with the Keyboard.Press method.
A quick Google search yields the following site on how to generate random strings:
http://www.c-sharpcorner.com/UploadFile ... umber.aspx

Regards,
Alex
Ranorex Team

girish
Posts: 4
Joined: Fri Jan 14, 2011 9:33 pm

Re: Image Validation and capturing Mouse Pointer actions.

Post by girish » Wed Jan 19, 2011 12:06 am

Thank You Alex...