How to implement Mouse Right button - 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: How to implement Mouse Right button (/Thread-How-to-implement-Mouse-Right-button) |
How to implement Mouse Right button - Ravi_Chandra - 01-18-2011 Hi, As part of the application functionality, we have to righ click a record and select one of the options. Can anyone provide a solution on how to write the code so that QTP can right click a record and select one of its options? Thanks, Ravi. RE: How to implement Mouse Right button - PrabhatN - 01-18-2011 Hi Ravi, You have mentioned that you have to right click on a record. What exactly a record is here? I mean is it a link or table content or what? I presume that it is a link and let say it has a name "Record1". After clicking the right mouse button, let say the menu comes is a WebElement. Below code may solve your purpose, Code: Set dReplayObj = CreateObject("Mercury.DeviceReplay")// Create an object of DeviceReplay You can spy on the objects, know the class types and then customize the above code accordingly. Let me know for further clarification. RE: How to implement Mouse Right button - Ravi_Chandra - 01-19-2011 Hi Prabhat, I have a data grid where I have to search the record (webelement) select the record right click on it and select the options from the right click menu. I am able to get webelement using the below code: Quote:Browser("XXX").Page("YYY").WebElement("ABC").SetToProperty "innertext", "abcd" Now I have to right click on this webelement.... Can you help me how can i achieve this? Thanks, Ravi. RE: How to implement Mouse Right button - Saket - 01-19-2011 See if any of this thread helps you- https://www.learnqtp.com/forums/archive/index.php/thread-2356.html https://www.learnqtp.com/forums/Thread-Right-Click-on-menu-in-Web-Table or you may try this - Code: Dim strObj RE: How to implement Mouse Right button - MailJayAbhi - 01-19-2011 Hi Ravi, Since you say that you have the Webelement , The simplest way to achieve this is 1.Use the Focus option onto the Webelement 2.Click on Shift+F10. This is a easier way and can be put in a loop as well. I hope this Helped. |