Forum Discussion
HKosova
Alumni
14 years agoHi Alex,
I guess this problem occurs because your recorded test uses the default SetText method for text input. This method changes the text in text boxes programmatically, and so may not raise certain web element events that seem to be used on your tested web site. Since these events are not raised, the drop-down list with airports doesn't appear during the test run.
To resolve the problem, you need to replace SetText in your test with Keys - a method for simulating actual key presses. In this case, all text input events will be raised properly, the drop-down list will appear as expected, and your test will be executed correctly.
You can also command TestComplete to always record text input using the Keys method instead of SetText. To do this, go to Tools > Options > Engines > Recording and set the Record text input into simple editors option to Keys.
You can create a property checkpoint to verify text in the drop-down list. To capture the drop-down list when selecting a target for the checkpoint, use the "point and fix" technique. I've attached a short video that demonstrates how to do this.
The recorded operations for item selection should work fine once you change SetText to Keys as I've explained above.
Hope this helps!
But when I play the test I've got the “Object does not exist” error (An
error occurred while calling the "HoverMouse"…)
I guess this problem occurs because your recorded test uses the default SetText method for text input. This method changes the text in text boxes programmatically, and so may not raise certain web element events that seem to be used on your tested web site. Since these events are not raised, the drop-down list with airports doesn't appear during the test run.
To resolve the problem, you need to replace SetText in your test with Keys - a method for simulating actual key presses. In this case, all text input events will be raised properly, the drop-down list will appear as expected, and your test will be executed correctly.
You can also command TestComplete to always record text input using the Keys method instead of SetText. To do this, go to Tools > Options > Engines > Recording and set the Record text input into simple editors option to Keys.
1. How can I test the list of those airports? (Every time when I enter
different airport codes the drop down list will have a different content.)
You can create a property checkpoint to verify text in the drop-down list. To capture the drop-down list when selecting a target for the checkpoint, use the "point and fix" technique. I've attached a short video that demonstrates how to do this.
2. How TestComplete can select (click) on any options from the list? (As I
said, HoverMouse operation has been already inserted in the test automaticaly)
The recorded operations for item selection should work fine once you change SetText to Keys as I've explained above.
Hope this helps!