Menu.Click() inconsistency
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2010
04:43 PM
05-04-2010
04:43 PM
Menu.Click() inconsistency
Is there any way to make the Menu.Click method more consistent?
I am on TestComplete 5 and am driving some context menus that come up when right-clicking on items in the Windows Explorer list. The function does not visually appear to move the mouse correctly as stated in the help (may be related to the fact that these menu have dividers between some items?), but this is probably insignificant because it manages to trigger the click event on the correct menu item... about 98% of the time.
It is the 2% of the time that it fails to trigger the menu item that is frustrating. In these cases it throws no errors but the event is not fired.
I have tried using both menu labels "third menu item|second sub-menu item" and indexes "[3]|[2]", but that does not seem to improve reliability much.
I suspect that, if I were somehow able to put some waits into the Menu.Click method itself, reliability would improve. Is there any way to do this?
Thanks
Martin
I am on TestComplete 5 and am driving some context menus that come up when right-clicking on items in the Windows Explorer list. The function does not visually appear to move the mouse correctly as stated in the help (may be related to the fact that these menu have dividers between some items?), but this is probably insignificant because it manages to trigger the click event on the correct menu item... about 98% of the time.
It is the 2% of the time that it fails to trigger the menu item that is frustrating. In these cases it throws no errors but the event is not fired.
I have tried using both menu labels "third menu item|second sub-menu item" and indexes "[3]|[2]", but that does not seem to improve reliability much.
I suspect that, if I were somehow able to put some waits into the Menu.Click method itself, reliability would improve. Is there any way to do this?
Thanks
Martin
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2010
10:18 PM
05-04-2010
10:18 PM
Hi Martin,
Try increasing the value of the 'Delay between events' project option from the 'Playback' options group. To open the project properties editor, double-click the project node in the 'Project Explorer' panel and switch to the 'Properties' page.
--
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2010
04:26 PM
05-09-2010
04:26 PM
Thanks for the tip David, but it wasn't exactly what I had in mind. The setting you have identified delays execution between lines of code in the script. Menu.Click's implementation carries out several 'actions' internally and it is between these actions that I want to put the delay. But, because Menu.Click only takes up one line in my script, the setting has no effect.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2010
03:18 AM
05-10-2010
03:18 AM
Hi Martin,
Ok, in this case I can suggest that you check how TestComplete 7.52 works in this situation. There were a lot of changes since TestComplete 5 and the issue you face can be already fixed. Moreover, we do not create any fixes for TestComplete 5 anymore.
Please let me know your results.
--
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
