maxthomassin
12 years agoOccasional Contributor
Get the focused object
Is there a way to get the focused item of my webpage?
For exemple, I would like to move to an object using Tab and then get THAT item.
all.Item("codeUtilisateur").Keys("[Tab][Tab][Tab]");
Now the selected item has changed and I would like to retrieve it.
Thanks !
For exemple, I would like to move to an object using Tab and then get THAT item.
all.Item("codeUtilisateur").Keys("[Tab][Tab][Tab]");
Now the selected item has changed and I would like to retrieve it.
Thanks !
- If you need to set focus to the specific item, then just call its focus() method.
But if you need to know what item will be focused after using [Tab], then I suggest using document.activeElement property. Though it will not be the TestComplete web object.