How do i display on screen messages?

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

How do i display on screen messages?

Post by stapes » Mon Oct 26, 2015 5:23 pm

massage.PNG
massage.PNG (7.55 KiB) Viewed 1286 times
When I am running the automation using Ranorex studio, a small dialog appears displaying various steps in the procedure. How can i send messages to this dialog?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How do i display on screen messages?

Post by odklizec » Tue Oct 27, 2015 8:24 am

Hi,

It should be possible to set the custom progress text using ActivityContext, as described here...
http://www.ranorex.com/forum/can-i-cont ... t2318.html
or here:
http://www.ranorex.com/forum/new-report ... t2066.html
However, these posts are very old and some of the described code may no longer be available or works differently?
Pavel Kudrys
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do i display on screen messages?

Post by krstcs » Tue Oct 27, 2015 3:50 pm

The simplest way is to add a Report.Info() followed by a Delay.Milliseconds(10000).

The dialog displays the last Report item logged, either by the Ranorex system or manually through a call to Report.Log/Info/Error, etc.

Adding the delay afterwards will force the dialog to wait before it moves to the next Report item/test step.

Code: Select all

Report.Info("Custom Message", "This is my custom message.");
Delay.Milliseconds(10000);
Shortcuts usually aren't...

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: How do i display on screen messages?

Post by stapes » Tue Oct 27, 2015 4:45 pm

Thanks, krstcs, that is exactly all I needed.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3921
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How do i display on screen messages?

Post by odklizec » Wed Oct 28, 2015 8:18 am

Heh it's easier than I would expect. I don't have a particular use for this, but it's good to know that for future ;)
Pavel Kudrys
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

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: How do i display on screen messages?

Post by stapes » Mon Nov 02, 2015 5:14 pm

it would be very useful, in addition to the above, to turn off the messages already coming from Ranorex Studio, as they bear little relation to what is going on.

Is this possible?

If so, how?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do i display on screen messages?

Post by krstcs » Mon Nov 02, 2015 9:00 pm

I'm sorry, maybe I'm missing something, but how do the messages that Ranorex is displaying have "little relation to" what Ranorex is doing? They are exactly related to what Ranorex is doing, as they are just log output of the steps that you created in the Ranorex recording, unless you are doing something else on your own.

Is there an error, or is something not working the way you expect? If so, could you describe what you are expecting and maybe we can help you achieve that?

I have been using Ranorex for 5 years and the logging has always been excellent.
Shortcuts usually aren't...