![]() |
ContextMenu item disabled Powerbuilder - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: ContextMenu item disabled Powerbuilder (/Thread-ContextMenu-item-disabled-Powerbuilder) |
ContextMenu item disabled Powerbuilder - Phread - 05-24-2012 I am using QTP 11 with a Powerbuilder application, on aWindowsXP box...yeah I know it is way behind. I can open a photolineup with the following: Code: PbWindow("w_goccivgperson_person").PbListView("lv_event").Select "Photo lineup", micRightBtn This opens a ContextMenu. Now , I can select delete and get rid of the photolineup, if I am using a role that allows this. When I change the role of the person logged to a role that cannot do it, the Delete is greyed out. I want to be able to know that it is greyed out, and report on that. However, whenever I have tried, I get thet the object cannot be found. Code: Window("Person").WinMenu("ContextMenu").CheckItemProperty("Delete",,"Delete",500) Code: temp = Window("Person").WinMenu("ContextMenu").WaitItemProperty("Delete",focused,"Delete",500) Please, anyone with any ideas....I have been looking for three days and my boss is getting annoyed at the delay. Thanks Nick RE: ContextMenu item disabled Powerbuilder - Shridevi.Salagare - 05-24-2012 Hi, I am not sure if I got ur question right..but what i understood is ..you want to check whether a typical button is greyed out or not. For this you can check the run time property - enabled and it will return 1(active) or 0(disabled) depending on condition. |