Page 1 of 1

Get focused element

Posted: Wed Jan 18, 2017 10:49 am
by yassine
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.

Re: Get focused element

Posted: Wed Jan 18, 2017 11:17 am
by odklizec
Hi,

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

/form[@title~'^YourApp']//element[@hasfocus='true']
But I guess the expected result highly depends on used GUI technology and implementation of given element.