Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
right Click on a object
#1
Not Solved
hi

i wanted to right click the cell of a table and then select some menu option
when i try to record ; nothing comes in the code

I think for right clicking; first we'll hav to set the focus on the required cell and then right click on it .
How will i be abl to do it

Thanks
Ramesh
Reply
#2
Not Solved
Hi,

Did you tried getRoproperty for finding x, y coordinates and then 'object.Click [x], [y], 1' where 1 is for right click.
Reply
#3
Not Solved
Hi tariksheth,

i think it's not a good idea to use the x and y axis propeteries to click on the object generally we should not use x and y axis to identify any object.
Thanks,
SUpputuri
Reply
#4
Not Solved
If may i ask what kind of object are you going to right click? You have to play around with GetROProperty or check out the FIREEVENT

You could try this one.

Code:
Set obj = CreateObject("Mercury.DeviceReplay")
Set WshShell = CreateObject("WScript.Shell")
'Get the absolute coordinates of the Object
absx = menu.QueryValue("abs_x")
absy = menu.QueryValue("abs_y")

obj.MouseClick absx, absy, 2
'Optional wait statement
wait 3

For i = 1 To idx-1
WshShell.sendkeys "{DOWN}"
Next
WshShell.sendkeys "{ENTER}"
Set WshSEll = nothing
Set obj = nothing

Lyndon Mac
Reply
#5
Not Solved
Sorry , Still not clear with ideas suggested

As one idea was to get the cordinates at run time and click on the object; can we folow it or Do we have some idea better than this

thanks
Ramesh Tahiliani
Reply
#6
Not Solved
I think you can set the focus on required cell using ChildItem.
Have you tried this? you can then do a right click using any of the methods suggested above.

Reply
#7
Not Solved
One of the few reasons why QTP wouldnt record is because the object could be a custom object. So, it is necessary to find out the object dev type.

Spying the object is a great value here, Do you get webtable ? If so then you can try the firevent method after selection.

Adding my 2 cents, Obtaining Co-ordinates should be the last resort because they are very much dependent on the system configuration and the application design behaviour.
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
  Right Click On a Image and Click on a Link in WebElement RameshKrishnan 4 5,139 07-10-2013, 04:13 PM
Last Post: RameshKrishnan
  How do I left click on the right click menu in WinTreeView? RandomGrin 0 3,657 12-22-2012, 04:22 AM
Last Post: RandomGrin
  How do I left click on the Right click menu? RandomGrin 2 3,956 12-18-2012, 09:47 PM
Last Post: RandomGrin
  Click Object hamzaz 3 2,866 07-26-2012, 04:38 PM
Last Post: Arul
Wink QTP cannot identify object When i click on run Sitesh Agrawal 2 3,235 07-28-2008, 02:53 PM
Last Post: Sitesh Agrawal

Forum Jump:


Users browsing this thread: 1 Guest(s)