Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capture context menu item
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi All,
Using QTP, I'm trying to right click on a web link and select "Save Target As". So far I haven't been able to do right click on the link to open the context menu. I tried (.FireEvent "onclick", 1) and it only clicks on the link similar to left clicking the link.
I also tried (.FireEvent "onContextMenu", 1)and nothing happened there.
Is there a way for doing this?

Thanks
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
QTP never records, right click events.
for that either you need to configure the xml file and import, which is a time consuming process OR simply add the syntax of right click to your code.

e.g.

Code:
Browser("abc").Page("abc").frame("xyz").Link("opq").Click 5,3,micRightBtn '(where 5, 3 are x, y co-ordinates)
Browser("abc").Page("abc").frame("xyz").webtable("ghi").FireEvent "oncontextmenu"
And then select your item from the context menu

above code will solve your problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to select item within WebMenu learnasugo 4 8,214 10-11-2016, 03:35 PM
Last Post: learnasugo
  ContextMenu item disabled Powerbuilder Phread 1 4,204 05-24-2012, 10:15 AM
Last Post: Shridevi.Salagare
  to check if an item in the list is disabled or not sujaravi123 6 15,828 12-13-2011, 08:15 PM
Last Post: PrabhatN
Question How to access Menu item using DP Charanpreet 0 3,141 04-19-2011, 07:34 PM
Last Post: Charanpreet
  How QTP records context menu in .net GUI applications vanibandla 1 4,605 02-25-2011, 06:32 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)