User code & progress display
User code & progress display
Built-in actions display some text in a window that pops up in the lower right corner of Ranorex Studo during execution (I don't know what this window is called technically). Some actions, like "Delay", even display a count-down watch. Can user code do that, too? If so, how?
Re: User code & progress display
Hi,
I believe you can write to progress form using Report method? Just add Report.Info or Report.Debug (with incorporate parameters) anywhere in your solution and check if it writes to progress dialog
I believe you can write to progress form using Report method? Just add Report.Info or Report.Debug (with incorporate parameters) anywhere in your solution and check if it writes to progress dialog

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
Re: User code & progress display
I'm sorry I was not precise enough when I posted my question. I wanted to know whether it is possible to display the count down. I found that calling Delay.Milliseconds etc. displays the count down, but what about user code that needs to do repeated checks for one out of several conditions? The code would check a timeout in every iteration, like this:
I'd like to display the count down while the loop is executed.
Code: Select all
var startTime = System.DateTime.Now;
do
{
// check conditions
}
while (System.DateTime.Now - startTime <= timeout);
Re: User code & progress display
Hi,
As I mentioned in my post, I believe that the only way how to update text in progress form, is by using Report method. So I guess you must simply add Report method inside the loop...
So if you want to display the countdown, you must do it inside the loop.
As I mentioned in my post, I believe that the only way how to update text in progress form, is by using Report method. So I guess you must simply add Report method inside the loop...
Code: Select all
var startTime = System.DateTime.Now;
do
{
// check conditions
Report.Debug(....);
}
while (System.DateTime.Now - startTime <= timeout);
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
Re: User code & progress display
Ok, so there is no elegant solution... thanks for pointing that out, it saves me from searching on and on! Btw yes, Report lets me output to the pop-up window. I haven't yet tried to output repeatedly.
Hans
Hans