-1

I need a qtf script that selects a line and proceeds. Recording the steps gave the following code:

Window("[windowname]").WinList("ListBox").Select "[Name of the item] "

But when I try to run it I see an error box: Cannot identify the specific item of the ListBox object.

This does not work with any of the lines. I cannot even select one with the arrow down key, the error is always the same.

theheadofabroom
  • 20,639
  • 5
  • 33
  • 65
Mutek
  • 21
  • 7
  • Have you tried to copy SELECT option exactly from html code? Maybe you skipped few characters (spaces)? – Mateusz Psujek Oct 30 '14 at 08:29
  • I did not copy it. I recorded it with QTP and it generated this code. – Mutek Oct 31 '14 at 12:59
  • The trailing blank in "[Name of the item] " might be the problem. – TheBlastOne Nov 06 '14 at 07:50
  • I also tried with and witout it. – Mutek Nov 07 '14 at 08:33
  • What happens if you select using the item index, as the documentation says is possible (" The item value (with quotes) or numeric index (without quotes) can denote the item. The first item in a list is numbered 0."). So what does a Select 0 or .Select 1 do? If that works, we can continue diagnosing further. If not, the AUT is somehow strange :| (i.e. not using GUI technology compatible with out-of-the-box Window/WinList test objects). – TheBlastOne Nov 28 '14 at 08:17

1 Answers1

0

Please try to highlight WinList from object repository before you run the script. If the object cannot be found, using an updating function to update the object property.

Also, make sure that every time you are running your script for standard window, your screen doesn't minimize.

  • THe highlighting works in object repository. QTP can recognize the WinList. The window does not minimize. The script doesn't even run if I hit retry when it stops. – Mutek Oct 30 '14 at 07:00