| || |
User Adam Quam (firstname.lastname@example.org) posted:
I have an asp webpage. If I click on a certain image, a popup menu comes
up. I have recorded this, and the recording looks like
Window SetContext, "WindowTag=WEBBrowser", ""
HTMLImage Click, "Type=HTMLImage;Index=7", "Coords=6,7"
PopupMenuSelect "Provider Comparison for Selected Specialty"
It fails at PopupMenuSelect command with the error message that it can't
find the menu item.
1. I tried to add a delay before the popupmenuselect command, up to 10
seconds, it didn't work.
2. I tried using some keystrokes to make sure the menu is ebabled and such
3. If I replace that Popupmenuselect with this one, it works fine:
These things make me think that it is somehow a text recognition problem,
which is fine on record but not on playback. The menu is being recognized
fine, because the pos type of choosing works fine.
Any other ideas anyone?
User DAVID MARSH (DAVID.MARSH@thales-cs.com.nospam) posted:
First stop recording and play back. Why? read this http://www.sigist.org.uk/m020509a.shtm
Second write functions.
Therefore something like
Function AdamPopupMenuSelect(sItem as String) As Integer
Dim Result as Integer
Result = 0
Select Case sItem
Case "Provider Comparison for Selected Specialty"
Case "Another string you wanted to Select
Result = 100
AdamPopupMenuSelect = Result
If you had several popups you could modify the case statements to
Case "Provider Comparison for Selected Specialty" or "blah blah
and so on
User Chris Gendreau (email@example.com) posted:
Is this on an NT 4 box by chance?
I use the PopupMenuSelect in many scripts. It works on all OS's except NT4. On NT4 I get the "can't find item" error you mentioned.
I've actually had to incorporate an OS checker to select a menu item differently if it is NT4.