Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to right click on webpage using QTP?
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi, I have to right click on webpage...Can anyone help me out here with some code?
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
What is the object you are trying to right click on? Is it just on the page?
Something I could remember of...
Method 1:
Code:
Setting.WebPackage("ReplayType") = 2
browser().page().webelement().Click ,,micRightBtn
'Setting.WebPackage("ReplayType") = 1 'Default 1

Method 2:
Code:
Set obj = CreateObject("mercury.devicereplay").
getX = webElem.GetROProperty("abs_x")
getY = webElem.GetROProperty("abs_y")

obj.MouseClick getX, getY,RIGHT_MOUSE_BUTTON

And then there is the crude way...But you have to find your way through it..the below is the clue to the puzzle Smile
Code:
Extern.Declare micVoid, "mouse_event", "user32.dll", "mouse_event", micLong, micLong, micLong, micLong, micLong
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  webpage WinObject has same name Ananthakumar_S 0 1,692 11-30-2016, 09:48 PM
Last Post: Ananthakumar_S
  Check specific links of a webpage rocky9 1 2,699 06-11-2015, 06:23 PM
Last Post: venkatesh9032
Exclamation How to verify whether pdf is completely loaded or not in webpage nmakkena 1 2,671 08-27-2014, 04:09 PM
Last Post: vinod123
  Handling .NET framework menu in webpage using QTP 10 vishnu1067 0 2,332 05-15-2014, 05:30 PM
Last Post: vishnu1067
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,809 04-18-2014, 10:01 PM
Last Post: Parke

Forum Jump:


Users browsing this thread: 1 Guest(s)