Page 1 of 1

Develop using code

Posted: Tue Nov 10, 2015 11:51 am
by satishmohan
Hi. Till now I was using Ranorex just to record and play. Now want to understand how the flow happens at the code level. May be start off with simple Test case like login-logout. Please suggest when i record this scenario, how do and where do i start to understand the code generated behind.

Re: Develop using code

Posted: Tue Nov 10, 2015 12:29 pm
by odklizec
Hi,

The easiest way to understand the code behind each action is to right click the recorded action and from the appeared menu select "View Code" (or use Ctrl + Enter shortcut). The code you will see is non-editable! It's auto-generated code and cannot be manually changed. The only way how to edit this code is to convert the selected action (or multiple actions) to User Code action (also via right click menu).

A good thing is to use breakpoints here or there, to watch the code flow and eventually continue with playback "step by step" using F11 shortcut (or similar debug shortcuts...see actions in menu Debug).

Re: Develop using code

Posted: Mon Dec 21, 2015 3:54 pm
by satishmohan
Hi. Attempted using right click - convert to user code. Then introduced a simple for loop to execute the whole test case (login-logout) to run in iterations (4 times). it give an error that there were compile errors. Please suggest.

Re: Develop using code

Posted: Mon Dec 21, 2015 4:46 pm
by krstcs
Without more information it will be hard to suggest anything...

Ranorex version?
Windows version?
EXACT error message(s)?

Please post the code being used.