Double clicking a row to retrieve data

2,054 views
Skip to first unread message

Daim

unread,
Dec 9, 2009, 12:45:15 AM12/9/09
to QTP - HP Quick Test Professional - Automated Software Testing
GUI designed in : Ext Jace (Javascript Framework)
QTP - ver 9.2

A pop up window opens containing multiple rows. I need to double click
a row so that it is selected on parent page. For that, I need some
assistance:

1.The webTable number of each row differ when I compared them using
Object Spy, e.g. the object hierarchy generated against 3 random rows
is as follows:

Browser -> Page -> WebTable: 23 -> WebElement: ORANGE
Browser -> Page -> WebTable: 213 -> WebElement: APPLE
Browser -> Page -> WebTable: 55 -> WebElement: GRAPES

2. How will I record the double click operation

mzraz...@gmail.com

unread,
Dec 9, 2009, 9:13:56 AM12/9/09
to mercu...@googlegroups.com
Browser -> Page -> WebTable: 23 -> WebElement.DoubleClick("ORANGE")


--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Daim Phillips

unread,
Dec 9, 2009, 11:51:29 PM12/9/09
to mercu...@googlegroups.com
1. There is no DoubleClick method that can be used

2. Secondly, the object spy shows hierarchy as

Browser -> Page -> WebTable -> WebElement

where as, when I add the objects, it adds

Browser -> Page -> WebElement

Can anyone plz assist me.

Regards





naveen naveen11

unread,
Dec 10, 2009, 12:43:52 PM12/10/09
to mercu...@googlegroups.com
Hi Daim,
 
As far as i understood from ur querie is that u need double click method.I know another approach use Browser("").Page("").WebElement("").fireevent "ondbclick".
 
pls. check for proper syntax by help of QTP. 
 
Regards
Naveen  
 
========================================================

 





--

bhavin v patel

unread,
Dec 10, 2009, 2:55:26 PM12/10/09
to QTP - HP Quick Test Professional - Automated Software Testing
You may need to add the webtable object manually here because some
time QTP does not adds the hidden hirearchy. or you can do Descriptive
Programming for that also. likz

Set obj= Browser("title:=X").Page("title:=X").WebTable
("title:=X").WebElement("title:=X")

* May need to do more research for that

2.
You can use Naveen's approach

3.
DOM object model may help you here.. like

Browser("").Page("").WebElement("").object.Doubleclick




You may want to do


On Dec 10, 12:43 pm, naveen naveen11 <naveen.navee...@gmail.com>
wrote:
> Hi Daim,
>
> As far as i understood from ur querie is that u need double click method.I
> know another approach use Browser("").Page("").WebElement("").fireevent
> "ondbclick".
>
> pls. check for proper syntax by help of QTP.
>
> Regards
> Naveen
>
> ========================================================
>
> On 12/10/09, Daim Phillips <daim9...@gmail.com> wrote:
>
>
>
>
>
> > 1. There is no DoubleClick method that can be used
>
> > 2. Secondly, the object spy shows hierarchy as
>
> > Browser -> Page -> WebTable -> WebElement
>
> > where as, when I add the objects, it adds
>
> > Browser -> Page -> WebElement
>
> > Can anyone plz assist me.
>
> > Regards
>
> > --
> > You received this message because you are subscribed to the Google
> > "QTP - HP Quick Test Professional - Automated Software Testing"
> > group.
> > To post to this group, send email to Mercu...@googlegroups.com
> > To unsubscribe from this group, send email to
> > MercuryQTP+...@googlegroups.com<MercuryQTP%2Bunsubscribe@googlegrou­ps.com>
> > For more options, visit this group at
> >http://groups.google.com/group/MercuryQTP?hl=en- Hide quoted text -
>
> - Show quoted text -

Daim Phillips

unread,
Dec 11, 2009, 2:13:35 AM12/11/09
to mercu...@googlegroups.com
I only need the double click method. The only method I found is DblClick, but that requires X and Y coordinates.

Can anyone help.

Set x = Browser("name:=PQR").Page("title:=123")

x.WebElement("innertext:=AB").FireEvent "DblClick"   'does nothing


naveen naveen11

unread,
Dec 11, 2009, 9:37:15 AM12/11/09
to mercu...@googlegroups.com
Hi,
 
1.I can not believe that fireevent "onclick" is not working have u gone through the hierarchy properly if yes than try alternate approach i.e Replay Type = 2 u can spy the HTML Code the see the action of that object,but this rarely works.
 
2. Close every thing for your system and again start ur QTP and then application pls. take care no other application is open before QTP.
 
3.If you have any idea of WSH and Device Replay if yes then try ur hand on this.
 
4. Last option is descriptive programming.
5. If all this dosentworks then contact with developer about the input type and action which he has specified in code,u can go shortcut way by directely going to developer and the action accordingly u need to set the action using DOM objects.
 
6. Try this whether it works
Browser("New Page").Page("New Page").WebElement("html tag:=Form").FireEvent "onpropertychange"
 
7. If all this option does not works then u van discuss with Tarun Lalwani in "Knowledgeinbox.com"

8.The name of event to trigger. Available events: onchange, onclick, ondblclick, onblur,

onfocus, onmousedown, onmouseup, onmouseover,

onmouseout, onsubmit, onreset, onpropertychange. 

just to show you this are events and x,y coordinates is optional u dont need write that and i am sure

 any of the above option will work.
Please reply back if this does not works.
 
Regards
Naveen Shrivastava 
 
=================================================================
 
 

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com

Bibek Khatiwara

unread,
Dec 12, 2009, 6:11:55 AM12/12/09
to mercu...@googlegroups.com
Diam ,X and Y co-ordinates can be found using getROProperty:

x_cord= Browser("name:=PQR").Page("title:=123").WebElement("innertext:=AB").getROProperty(X)
y_cord=Browser("name:=PQR").Page("title:=123").WebElement("innertext:=AB").getROProperty(Y)

 Browser("name:=PQR").Page("title:=123").WebElement("innertext:=AB").FireEvent "DblClick"

Please have a try...





--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,
Bibek

Bibek Khatiwara

unread,
Dec 12, 2009, 6:13:36 AM12/12/09
to mercu...@googlegroups.com
Diam ,X and Y co-ordinates can be found using getROProperty:

x_cord= Browser("name:=PQR").Page("
title:=123").WebElement("innertext:=AB").getROProperty(X)
y_cord=Browser("name:=PQR").Page("title:=123").WebElement("innertext:=AB").getROProperty(Y)


Please have a try with the cordinated to the "DblClick" method...DblClick(x_cord,y_cord)


On Fri, Dec 11, 2009 at 12:43 PM, Daim Phillips <daim...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,
Bibek


naveen naveen11

unread,
Dec 12, 2009, 11:53:05 AM12/12/09
to mercu...@googlegroups.com
Hi Bibek

Its long talking with u coming to present i dont think x and y coordinates is required,its my feeling if i am wrong please correct me.

Regards
Naveen Shrivastava

=================================================

Daim Phillips

unread,
Dec 14, 2009, 2:22:34 AM12/14/09
to mercu...@googlegroups.com
Thanks a lot naveen for your suggestion.

it did work but in following way

Browser("").Page("").WebElement("SYZ").FireEvent "onclick"
Browser("").Page("").WebElement("XYZ").FireEvent "ondblclick"

OR

Browser("").Page("").WebElement("SYZ").FireEvent "onfocus"
Browser("").Page("").WebElement("XYZ").FireEvent "ondblclick"

In short, the first line of script should get it focused and then perform double click operation.

Daim Phillips

unread,
Dec 14, 2009, 2:23:09 AM12/14/09
to mercu...@googlegroups.com
Thanks a lot naveen for your suggestion.

it did work but in following way

Browser("").Page("").
WebElement("XYZ").FireEvent "onclick"

Browser("").Page("").WebElement("XYZ").FireEvent "ondblclick"

OR

Browser("").Page("").WebElement("XYZ").FireEvent "onfocus"

naveen naveen11

unread,
Dec 14, 2009, 9:42:21 AM12/14/09
to mercu...@googlegroups.com
Hi Daim,

Thanks u apllied my suggestion now there is one request just send me the complete code just to see how we can improvise because most ot the time this fire event fails so we can also go through childitem().

Regards
Naveen
====================================

Daim Phillips

unread,
Dec 15, 2009, 2:11:18 AM12/15/09
to mercu...@googlegroups.com
I have already sent that.


Browser("").Page("").WebElement("SYZ").FireEvent "onfocus"
Browser("").Page("").WebElement("SYZ").FireEvent "ondblclick"


santosh kumar

unread,
Dec 29, 2009, 1:43:59 AM12/29/09
to mercu...@googlegroups.com
Hi,
 
For double clicking a row,I have used the following.It worked fine.
 
 
Browser("").Page("").WebElement("SYZ").drag
Browser("").Page("").WebElement("SYZ").drop

Regards,
Santosh
 
 

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en



--
Regards,
Santosh

Daim Phillips

unread,
Dec 30, 2009, 12:53:14 AM12/30/09
to mercu...@googlegroups.com
The Drag and Drop doesn't work. It only highlights the row. The following one always work


Browser("").Page("").WebElement("SYZ").FireEvent "onfocus"
Browser("").Page("").WebElement("SYZ").FireEvent "ondblclick"


Sreedhar

unread,
Dec 30, 2009, 2:09:11 AM12/30/09
to mercu...@googlegroups.com

Dynamically get the web table(from the total noof webtables in that
popup) using DP and using its properties like the total noof columns and etc
Once u get the web table required get the row count and then search the
required value and double click on it...
Reply all
Reply to author
Forward
0 new messages