Could you please any body help me.for example in web table
in the first row and first column there are 3 links like
l1,l2,l3 having indexes 0,1,2 but second time links will
change their order like l2,l3,l1 and indexes also changed
how can we handle this situvation with script....

Answer Posted / kavitapriyacr

At this point, We can do 2 ways
1. If that link can be accessed without help of table then
you should use the property which is unique for each links,
say for example html id/text/inner text etc.
For ex:
Browser("abc").Page("abc").Link("outerhtml:=abc11.*").Click
2. Use descriptive programming as below.
linkCount=Browser("abc").Page("abc").ChildItemsCount
(1,1,"Link")
If linkCount>0 Then
i=0
Flag=0
Do While (i < linkCount OR Flag=0)
oProperty=Browser("abc").Page("abc").ChildItem
(1,1,"Link",i)
If (StrComp(oProperty.GetROProperty("text"),"11")=0)
Then
oProperty.Click
Flag=1
EndIf
i=i+1
Loop
End If

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

1438


What is an optional step in qtp ?

627


Is qtp supports uni-code?

600


How is a Step generator used in UFT?

648


Step 3&4 are repeated until an the object in recognised uniquely.

1516






When ‘option explicit’ keyword is used in qtp?

744


Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?

1505


How to use Environment parameterization? Explain with an example.

1473


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

645


Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.

1362


what is the difference between IE & Netscape in web testing on a log in page

1783


what is the latest version of QTP? Main difference between 9.2 and 10 version

1540


your coming from electrical backgroung..but y ur coming to software side?

1378


I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1447


Is it possible to split an action? How?

652