How to highlight an element on the application during run time

Ask general questions here.
premravi
Posts: 128
Joined: Tue Jan 08, 2019 1:55 pm

How to highlight an element on the application during run time

Post by premravi » Mon Feb 11, 2019 3:20 pm

Hi,

I am trying to highlight an element on the application during the run time,

Basically the requirement is very simple,

I want to show the client the target region where the action is performed,

So if that region will highlight during the run time it will be clearly visible that where exactly the actions being performed,

Please let me know if there is any predefined method or we have to write some code to achieve it

Thank You

User avatar
qwertzu
Posts: 284
Joined: Wed Jan 25, 2017 11:08 am

Re: How to highlight an element on the application during run time

Post by qwertzu » Mon Feb 11, 2019 3:25 pm

hi,
Ranorex does not provide such functionality, so I guess you'll have to implement this on your own.
I can hardly think, that many users need this.
regards, qwertzu

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

Re: How to highlight an element on the application during run time

Post by odklizec » Mon Feb 11, 2019 5:13 pm

Hi,

Something like this has been discussed here...
is-it-possible-to-highlight-an-element- ... tml#p39458
However, it uses an unsupported API and it may no longer work? Just give it a try ;)
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

premravi
Posts: 128
Joined: Tue Jan 08, 2019 1:55 pm

Re: How to highlight an element on the application during run time

Post by premravi » Tue Feb 12, 2019 12:16 pm

Hi,

Sure, I ll try with that API just in case if it works
And, yes this is a good add on to the Ranorex tool if we have some predefined method in built in Ranorex tool

It will really helpful

Raising this concern here so that it will reach out to the right person

Thanks

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

Re: How to highlight an element on the application during run time

Post by odklizec » Tue Feb 12, 2019 12:31 pm

Hi,

The best place for feature requests is Ranorex User Voice platform, where you can post your feature requests or vote for existing requests:
https://uservoice.ranorex.com/forums/15 ... ve-ranorex

In my opinion, the reason why there is no element highlighting, as an optional action parameter, is that it would slowdown the test and increase risk of problems. Basically, it adds another (unnecessary) level of complexity to tests.

BTW, I just checked Report.Screenshot method and it seems there is already available parameter highlightWithinSurroundingArea, which does exactly what you want!
highlightWithinSurroundingArea (Boolean)
If set to true the screenshot will not only contain the element, but also its surrounding area and will highlight the element within it.
So all you have to do is to add user code featuring Report.Screenshot method with above mentioned parameter. But no, there is currently no such parameter for recording action.
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

manish
Certified Professional
Certified Professional
Posts: 53
Joined: Fri Aug 10, 2018 12:46 pm

Re: How to highlight an element on the application during run time

Post by manish » Tue Feb 12, 2019 1:27 pm

Hi,

You can try the Focus() method with the object you want to highlight.
Alternatively, you can move the mouse pointer to the location where you want to carry out an action to show your clients.