Get focused element

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 11
Joined: Mon Jan 09, 2017 12:49 pm

Get focused element

Post by yassine » Wed Jan 18, 2017 10:49 am

Hello every one,

Is there a way o get focused element in an app and get associated repo item to that element?

Thanks in advance.

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

Re: Get focused element

Post by odklizec » Wed Jan 18, 2017 11:17 am


Please upload a Ranorex snapshot (not screenshot) of the focused element in question. Basically, it should be possible to identify a focused element via "hasfocus" attribute. So for example, the xpath could look like this:

Code: Select all

But I guess the expected result highly depends on used GUI technology and implementation of given element.
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