Forum Discussion

s5h's avatar
s5h
Contributor
11 years ago

HTML Check if object has the focus

Hi  I was wondering how you would check in TC if a HTML object like a textbox currently has the focus.  I have tried the document.HasFocus but does not work for me.  any ideas
  • dganov's avatar
    11 years ago
    Try to use document.activeElement property. It will return the native web object, so it will not have TestComplete specific properties and methods.