Forum Discussion

Morgan's avatar
Morgan
Frequent Contributor
14 years ago

Inconsistencies with finding menu items

I am testing a product developed in Delphi using TC8.1 and vbscript.  I have randomly noticed cases in which TC cannot locate a menu item but, upon restarting TC, it will then correctly locate the menu item and continue although no changes were made.  I just saw this exact scenario occur.



The line of code with the problem was..

Call p.frmMainScrn.MainMenu.Click("File|Security|Login")  



The message in the playback recorder indictated that TC was looking for a preference window no way related to the menu I was attempting to access!  I even tried re-recording and playing back the newly recorded script but received the same result.  Very puzzled, I restarted TC and now it works perfectly and finds the menu item without fail.



Is there anything else that I can do to ensure that these menus are found consistently?  



Thanks,

Morgan    
  • Hi,



    Make sure that recognition parameters for 'frmMainScrn' are unique. It looks like TC tries to obtain a wrong object because it meets the same recognition criteria.