Forum Discussion

WillClarke's avatar
WillClarke
Occasional Contributor
7 years ago

Web Input determine focus and value

Is there a way to determine what input on the page currently has focus through test complete? I havent seen anything thusfar.

 

Also a way to pull the current value of said input.

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm assuming that you have a field that is supposed to have focus.  Rather than looking over the whole page to find which one has focus, I would check the properties of that one item and see if it has a property like "HasFocus" or something like that.  

     

    As for the value, there are different properties depending upon the control.  It might be something like "Value" or "wText" or "Text" or something similar like that.