| View previous topic :: View next topic |
| Author |
Message |
jasong
Joined: 26 Oct 2007 Posts: 49 Location: Texas
|
Posted: Wed Oct 31, 2007 8:31 pm Post subject: more verbose exit status on FAILED? |
|
Is it possible to receive more verbose failure information than just 'FAILED'?
Some good bits of information would be the exception, control the error appeared with, and the action attempted.
Jason |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 257
|
Posted: Fri Nov 02, 2007 11:10 am Post subject: |
|
I assume that you mean the code generated by the RanorexRecorder. By default the generated code does not include any error checks nor status loggings.
Of course you can easily extend the generated code, check the return value of methods and print log statements if they have failed.
We're currently discussing how to improve logging in future versions.
Regards,
Alex
Ranorex Support Team
Last edited by Support Team on Thu Nov 08, 2007 2:34 pm; edited 1 time in total |
|
| Back to top |
|
 |
jasong
Joined: 26 Oct 2007 Posts: 49 Location: Texas
|
Posted: Tue Nov 06, 2007 2:33 am Post subject: a Pythonic way to deal with failures |
|
A good Pythonic way to deal with this would be to create a set of exceptions that act as your messengers.
Put each action (e.g. mouseclick) inside a try clause and test for the various exceptions that could be generated by that action. This gives an extreme amount of power to the script writer and tester to be able to not just receive better information but how to optionally handle it.
Logging (and I recommend using the Python logging module) is a way to capitalize on all of this.
Keep up the good work! |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 257
|
Posted: Tue Nov 06, 2007 10:49 am Post subject: |
|
Thank you for your feedback! We will consider your suggestions for the next feature prioritization.
Regards,
Alex
Ranorex Support Team |
|
| Back to top |
|
 |
jasong
Joined: 26 Oct 2007 Posts: 49 Location: Texas
|
Posted: Wed Nov 07, 2007 7:54 pm Post subject: |
|
How specifically could I return results that would appear in the Recorder?
For example 'Can not find <control>' |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 257
|
Posted: Thu Nov 08, 2007 2:43 pm Post subject: |
|
Just check the return value of the corresponding Ranorex method and print information about the error.
E.g. if the generated script calls the
Code: click into code to enlarge
RanorexPython.FormFindChildControlName(hWndForm, controlName)
method, check if the return value is zero. If so, print out a message like "Cannot find control 'controlName'.".
Alex
Ranorex Support Team |
|
| Back to top |
|
 |
|