Page 1 of 1

How to avoid co-ordinate based events which get created by r

Posted: Mon May 09, 2016 6:15 am
by ask007
Hi,
I'm having following doubts
1. How to automate image based test without using recording? Please provide example
2. Is it really necessary to create repo using recording every time? Is there any alternative available?
3. How to avoid co-ordinate based events which get created by recordings?
ex: repo.Open.ButtonOpen.Click("10;4");

Please provide sample code for more understanding

Thanks in advance :D

Re: How to avoid co-ordinate based events which get created by r

Posted: Tue May 10, 2016 12:19 pm
by Support Team
Hi ask007,

Please find the answers to your questions below.

1) Image Based Automation
Information about image based automation in code modules can be found in our user guide.
Furthermore, I would suggest having a look at the API documentation concerning the Validate.CompareImage() and Validate.ContainsImage() method.

2) Adding Repository Items
UI elements can be added to the repository independently from recording modules. I would recommend having a look at the user guide section about Ranorex Spy.

3) Change Click Location
In order click actions are recorded with the click location 'Center', please change the global setting 'Coordinate recording mode' to 'None'.
coordinate_recording_mode.png
I hope this information will help you.

Sincerely,
Johannes

Re: How to avoid co-ordinate based events which get created by r

Posted: Wed May 18, 2016 1:17 pm
by ask007
Hi,
Thanks for reverting back. I'm having one doubt as-
Cant we avoid coordinates or rectangle itself?
ex:
CompressedImage Client_Screenshot1
{ get { return imagerepo.Photoshop2.ClientInfo.GetScreenshot1(new Rectangle(144, 81, 11, 15));
}
}
How same rectangle coordinates works with diff type of screens?

Support Team wrote:Hi ask007,

Please find the answers to your questions below.

1) Image Based Automation
Information about image based automation in code modules can be found in our user guide.
Furthermore, I would suggest having a look at the API documentation concerning the Validate.CompareImage() and Validate.ContainsImage() method.

2) Adding Repository Items
UI elements can be added to the repository independently from recording modules. I would recommend having a look at the user guide section about Ranorex Spy.

3) Change Click Location
In order click actions are recorded with the click location 'Center', please change the global setting 'Coordinate recording mode' to 'None'.
coordinate_recording_mode.png
I hope this information will help you.

Sincerely,
Johannes

Re: How to avoid co-ordinate based events which get created by r

Posted: Fri May 20, 2016 1:23 pm
by Support Team
Hi ask007,

The Rectangle object is needed for image based validation in order to know which part of the image needs to be considered.

Please note that if you perform image based automation/validation, you have to make sure that color and resolution settings are the same as on the machine you made the test/recording on.

If you need more information, please do let me know.

Sincerely,
Johannes