user2993178
user2993178

Reputation: 97

How to test the auto fill listbox in WPFObject("SearchBox")?

I have a WPFObject("SearchBox") in my WPF application.Its an autofill searchbox.On typing a text in it,it displays a listbox with text related to the search.

What is the best way to test it ?I am using TC9 and jscript.

Thanks!

Upvotes: 0

Views: 107

Answers (1)

Dmitry Nikolaev
Dmitry Nikolaev

Reputation: 3908

You need to use the Keys method. For example:

parentObj.WPFObject("SearchBox").Keys("test");

By default, TestComplete records text typing with the SetText method as it works faster than Keys, but in some cases you need to simulate working with a keyboard and the Keys method is the best way to go. You can find information on this in the Simulating Keystrokes help topic. Also, please see the Entering Text into an Edit Control topic for information on the difference between these two methods and the Recording Options Dialog topic to get information on how to make TestComplete use the Keys method when recording a new test.

Upvotes: 0

Related Questions