I'm having a problem gettnig QARun to recognise a Delphi combobox (drop down list). It's in the object map and I also created an alias for it. The default value on the control itself is set to no value (blank) and is highlighted as soon as the window appears. I record the action as activating the list and selecting an item, yet when it comes to replaying the script I get the message "...window is disabled" I've tried various things including SetFocus() and resetting focus at window and control level yet I just can't seem to get the list to activate and select as was recorded. Perhaps I'm missing something obvious - though I'm too much of a novice to be able to attempt something flash at the moment. Any ideas?
[This message has been edited by Chico (edited 08-16-2001).]
Is the class a TComboBox or some kind of data list combo thing?
I'm automating Delphi apps too and found that most combo boxes in my app contain an edit box. If yours also has an edit box then just use that. Instead of using the selecting the option, have it type it in the edit box.
Use your object inspector and move it around the combo box and watch the class name, see if you have TEdit show up.
I've tried mapping the control as alias ComboBox, ListView and Edit, plus a few others and this hasn't worked, unfortunately.
In the identifier, it is a T['OurAppName']ComboBox, but the control 'Type' is actually 'Childwindow'! It will therefore attach ok when in the object map of this type but will not obviously perform any other action to select items from the drop down list ("Attach window is disabled...") given that it is a window. I still get this message when it is of another alias. If the aliases don't work, I appear a little stumped!
[This message has been edited by Chico (edited 08-17-2001).]
QARun is recognizing TCombobox controls correctly in my application, so I wanted to make sure you knew that the Alias map and the Attach map aren't the same thing. The Alias map tells QARun what 'Type' to use in the Attach map for a given class name, such as TCombobox.
Thank you for that idea, though I seem to have overcome the problem now.
I usually manually select objects to put into the object map prior to scripting. But the problem was solved using the 'prompt while learning' setting. I found that when I clicked on the combobox first, I was prompted to name the child window. I then continued, and when I clicked on the drop down list to choose from the menu, I was additionally prompted to name the combobox entry! So, two entries for the same control were required. This may be symptomatic of my missing something obvious, but a helpful hint might be to use the 'prompt while learning' setting occasionally to ensure all objects used are mapped - especially if they're not being recognised.
Thank you for your suggestions - they prompted me to think a little more about what I was doing!