Forum Discussion

manisha's avatar
manisha
Occasional Contributor
9 years ago
Solved

Auto search result comes while recording but the same search result not come at the time of playback

I am testing an application where in on entering the text in the search box the search result comes while recording the steps but the same thing did not work in the playback.

 

  • How are you setting the text?

     

    This came up with someone earlier. They were using SetText, changing it to Keys fixed the problems.

     

    SetText simply sets the value of the control, but it doesn't simulate keypresses. Keys will similuate a user entering text letter by letter. If your field has any sort of OnKeyPress type event triggers (as auto-populate usually does) then you more than likely need to use the Keys method to trigger them.

1 Reply

  • How are you setting the text?

     

    This came up with someone earlier. They were using SetText, changing it to Keys fixed the problems.

     

    SetText simply sets the value of the control, but it doesn't simulate keypresses. Keys will similuate a user entering text letter by letter. If your field has any sort of OnKeyPress type event triggers (as auto-populate usually does) then you more than likely need to use the Keys method to trigger them.