Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to record the double click actions
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi All,
Please observe the attached screen shot
My scenario 1) is--> I need to record some of double click actions in my application
2) Need to perform double click on particular value, how to do this action on specific value
Please let me know if u have any solution for this
Thanks,
Venkat.Batchu


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 3 Months, 2 Weeks ago
Please ensure you provide us some kind of minimal technical details before you post.

1. What is the object which is holding the values ?
2. Have you tried to spy on it ??

Quicker the reply, quicker the reply.
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
#3
Solved: 11 Years, 3 Months, 2 Weeks ago
although I agree with Basanth's Sugestion - if you can post more technical details then we can defintely help you in better way.

If I have understood it correct you want to a double click operation on a particular object
I can suggest you for the second scenario
2) Need to perform double click on particular value, how to do this action on specific value

get the x, y co-ordinates of the object on which you want to perform the double click.
Create and object of Mercury.DeviceReplay

use
Code:
object.MouseDblClick( x, y, Button )

where Object is device replay object
and possible values for Button can be
LEFT_MOUSE_BUTTON = 0
MIDDLE_MOUSE_BUTTON = 1
RIGHT_MOUSE_BUTTON = 2

Reply
#4
Solved: 11 Years, 3 Months, 2 Weeks ago
Saket -
DeviceReplay might not always be the best solution to perform. In a application where the co-ordinates change dynamically, you may need to perform few modifications to the axes obtained before clicking on it. Always we would first need to find the object and explore all the possibilites of a doubleclick action. If not available then we may proceed with API's or DeviceReplay or Sendkeys etc...

Just a suggestion :-)
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
#5
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi,
Please find the attached screen shot for more information.
While recording the double click action script is generated for this scenario...

Regards,
Venkat.Batchu


Attached Files Image(s)
   
Reply
#6
Solved: 11 Years, 3 Months, 2 Weeks ago
This helps. Add the webtable object to your Object repository and paste the below code in the expert view and execute it.

Code:
rowcount = Browser().page().frame().webtable().rowcount

For i = 0 to rowcount - 1
   cellvalues = Browser().page().frame().webtable().getcelldata(i, 1)
   if Instr(Trim(Cellvalues),"Venkat") <> 0 Then
          Browser().page().frame().webtable().Fireevent "ondblclick"
Next

if the above throws a error or does not work try this,

ItemRowNum = Browser().page().frame().webtable().Getrowwithcelltext("venkatbabu")

Browser().page().frame().webtable().object.Rows(ItemRowNum).Cells(1).Fireevent "ondblclick"

Let me know if it helps.
Please be aware that the most skeletal part of a raw code has been supplied to you. Please tweak according to your requirement and your coding standards. Logic is the only part which remains untouched.
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
#7
Solved: 11 Years, 3 Months, 2 Weeks ago
Could you please share the information about "Sendkeys" i.e, windows script like any kind of tutorial or documents related to this....
Reply
#8
Solved: 11 Years, 3 Months, 2 Weeks ago
Did you try QTP Help ?? I wish you had done it since it is right in there. Just type SendKeys and you will get plethora of information about it.

On a sideline check this out,
http://msdn.microsoft.com/en-us/library/...S.85).aspx
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
#9
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi,
I tried with your valuable suggestion but i am getting little problem for this please find the attached screen shot...


Attached Files Image(s)
   
Reply
#10
Solved: 11 Years, 3 Months, 2 Weeks ago
Try this,

Code:
Browser().page().frame().webelement("name:=Venkat.*").Firevent "ondblclick"

Does this work ?
Sorry, I mislead. Try this,

Browser().page().frame().webelement("innertext:=Venkat.*").Firevent "ondblclick"
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
  How to perform the "Double click" event on Java Addins i.e Java button venkatbatchu 2 7,898 01-24-2010, 01:07 PM
Last Post: venkatbatchu
  Call to COPY of Actions from QC8.2 (file system) to QTP 9.5 not copying the actions govqa 0 2,387 05-13-2009, 01:44 PM
Last Post: govqa

Forum Jump:


Users browsing this thread: 9 Guest(s)