Micro Focus QTP (UFT) Forums
Unable to automate WPF Context sensitive menu - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Unable to automate WPF Context sensitive menu (/Thread-Unable-to-automate-WPF-Context-sensitive-menu)



Unable to automate WPF Context sensitive menu - aditya_vardhan07 - 10-25-2011

Hello,

Here is the configuration that we are using for test environment:

•QTP 11(Build 1018) + WPF add-in
•Windows 2008 Server R2


Issue details: (Each solution which I have tried out is mentioned as a bullet point. Replies/suggestions are welcome to any/all of the points)

•We are trying to record context sensitive (right-click) menu. When trying to record this, QTP hangs and sometimes the application also hangs. Eventually, the recording of the context menu does not happen. I would expect that if the recording happens correctly, I should see a WpfMenu type object. Any suggestions/settings to QTP/application?


•To workaround the issue of non-recording, I have executed the ShowContextMenu on the parent object(WpfObject) of the context menu. The issue, here, is that the context menu shows up but when trying to execute another method/event to click on a context menu object/selection, the execution control goes back to QTP and at this point, the context menu in the application goes away/stops getting displayed. Is there any way that the context menu can be made to "persist" when the execution control goes back to QTP?


•Ideally Shift+F10 works to bring up the context menu on any application and Shift+F10+<menu hot key> chooses a selection from the context menu. Issue: Shift+F10 does not bring up the context menu in the test application. In any case, the test application context menu does not have any hot keys for menu selections. Is there any other hot key combination that I could try out?