Develop using code
-
- Posts: 56
- Joined: Wed Jun 10, 2015 4:35 pm
Develop using code
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
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).
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).
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 56
- Joined: Wed Jun 10, 2015 4:35 pm
Re: Develop using code
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
Without more information it will be hard to suggest anything...
Ranorex version?
Windows version?
EXACT error message(s)?
Please post the code being used.
Ranorex version?
Windows version?
EXACT error message(s)?
Please post the code being used.
Shortcuts usually aren't...