Menuitems
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Menuitems
Hi,
I'm having issues trying to run a simple menu selection. I tried mapping the menu name AssociateMaintenance but it wouldn't work & the object spy couldn't find the mapped name.
The script attached opens the main menu 'Associate' but it won't click the 'Associate Maintenance' menuitem.
Any Suggestions?
Thanks in advance
Dave
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My thought:
It is entirely likely that this is a timing issue. Keep in mind that TestComplete executes the script code as fast as possible. So, if there is any sort of delay between the first click and the popup being visible, then your code will fail.
Insert in between the two clicks some sort of delay. I would recommend using something like a "WaitProperty" on the popup to wait for the Visible property to be true. If you simply want to test the theory, you can add a Delay(1000) in between to see if this corrects the problem and the retrofit the WaitProperty call.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your original post, you posted a screenshot showing the object browser. In that object browser, the Popup window... notice how it is in a grey font rather than black like everything else? That means that, at the time of the screenshot, it is not "Visible". Everything is present, but that popup is not actually visible. So, that means that, when you click on the menu to generate the popup, before you click on an individual menu item, you need to wait for that popup to be Visible.
So, your code should include, after the click on the menu, something like
Aliases.menubarApplication.menuitemAssociate.popupAssociate.WaitProperty('Visible', true, 2000);This will wait up to 2 seconds for that popup to actually resolve as visible before you attempt to click on the individual menu item. The clue is the "Overlapping Window" error.... there is something that is overlapping what you're trying to click.... and I'm guessing that it's because the popup isn't fully resolved yet. Give the above a try.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It still gives the same result...overlapping window. I also increase the wait time but still no go.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Next thing, then... the Overlapping Window error has, in the Additional Info panel, a descriptor of what window it actually is. That's the next step in diagnosing... what, exactly, is overlapping?
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I done what you suggested and realized from there the mapping was incorrect for the menu items. I fixed the mapping issue and the menu items are working now.
Thanks Again!!
