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

Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?

1577


what is test scheduleling?

2122


What are the ordinal identifiers in web page?

738


What are the five challenges you faced in QTP?

2838


What are the Disadvantages of shared object repository?

668






How did you use regular expressions in QTP and also in WR?

2279


Where to use Property Let, Property Get, Property Set in UFT

467


Can we use index on view?

1711


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

1597


what is the difference between the modular framework and datadriven frame work

2013


Can anyone pls tell me how to do action parameterization (input and output parameters) with respect to login window and insert order of flight reservation window in detail( pls give a clear step by step explanation with example) anyone please. Will be very thankful to u

1462


what is Property......End Property loop? how to write sript for it in QTP

1995


How to remove the associated function library?

616


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

1525


what is stepin & stepout?

1511