QTP and Menu Labels with ShortCuts - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: QTP and Menu Labels with ShortCuts (/Thread-QTP-and-Menu-Labels-with-ShortCuts) |
QTP and Menu Labels with ShortCuts - Couture_Jennifer - 01-30-2009 Hi All, I am working on scripting for a .Net based application. There are WinMenu options that I am trying to verify their labels. Two of the labels include Ctrl+S type shortcuts on the end of the labels. I can get the label and record it in my results. I then took that and set it to a variable and tried a compare as a "checkpoint", but it fails everytime saying the values are not equal. I do not understand this as I took the value it outputted before from a lbl= menuObjfm.GetItemProperty(itemPathfm, "Label") type code. Does anyone have any idea why the two values are not matching, but when printed side by side they look exactly alike? Please any help would be greatly appreciated. Thank you Jen RE: QTP and Menu Labels with ShortCuts - Couture_Jennifer - 02-11-2009 So I have also noticed that the length of the label from the menu and the lentgh of the text I copied from the label are exactly the same, as expected. However the StrComp() is still returning -1. A simple menuLabel = "Save Ctrl+S" does not work. Would there be some way to convert the label to just string values? My assumption is that the short cut has some code behind it that does not allow the comparision to occur correctly. PLEASE HELP! This is really an issue since QTP's checkpoints dont work with the menu labels directly. Thanks again, Jen |