I have a script that drives a SmarTerm terminal emulator and it has worked perfectly for months -- and now, all of a sudden -- it cannot find the commands on the drop-down menus using the MenuSelect command.
For example, in the script, I have:
Now, it cannot find the "Toolbars..." option. When I record a sample script and select View - Toolbars... the script code looks like this:
(Even though "menus by ID" is not checked in the Learn Settings.)
This is not on a machine that I have full control over -- my guess is that something (a DLL?) -- got corrupted, changed, etc?
I have also already tried making a recording of navigating through Notepad -- it records the menu select names correctly. I have uninstalled and re-installed the SmarTerm terminal emulator software (twice )...
I seen this problem all the time. But for me it works sometimes and sometimes it doesn't.
To get around it, at least it worked for me, I attached to the main window and hit the F5 key. This seemed to refresh the menu and now that function works(most of the time now).
Just record clicking the window and hitting F5. Then edit to fit your needs.
This may help you. But I found that it's not always good to put F5 in scripts that are testing your AUT. Sometimes you might have a bug in your menu(not showing correct options), and when you hit F5 it will refresh and then display the correct options. This is the same for menu checks. Menu Checks automaticly refresh the menu. I had menu checks that always passed when they should have failed.
"If your not part of the solution, there's good money to be made in prolonging the problem."