01-18-2011, 06:56 PM
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,
You can spy on the objects, know the class types and then customize the above code accordingly.
Let me know for further clarification.
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
get_X = Browser("").Page("").Link("Record1").GetROProperty("abs_x")// Get X axis value of Record1
get_Y = Browser("").Page("").Link("Record1").GetROProperty("abs_y")// Get Y axis value of Record1
dReplayObj.MouseClick get_X,get_Y,RIGHT_MOUSE_BUTTON// Right click on the Record1
Browser("").Page("").WebElement("Menu").Click// Chose any option
You can spy on the objects, know the class types and then customize the above code accordingly.
Let me know for further clarification.