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....

Answers were Sorted based on User's Feedback



Could you please any body help me.for example in web table in the first row and first column there ..

Answer / 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

Could you please any body help me.for example in web table in the first row and first column there ..

Answer / sid

Hi Kavitapriyacr

Could you please explain above code with description ?

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?

1 Answers  


Which is the best testing institute for QTP training in Hyderabad.

25 Answers   Wipro,


I have one question as HP QTP is concern, Please send your answers..... Can we do testing of any application without using any of the framework which are we used in QTP tool. If yes then how it can be possible in the HP QTP tool. -- Regards

5 Answers   ABC,


wt is the xtension of the QTP result view file?

4 Answers  


How do we create and run the scripts with out using O.R. ?

5 Answers  






If I change the object name in one action will it be updated in all the actions? Or not?

0 Answers  


Hi. plz expalin abouit SetToProperty, SetRoProperty, GetToProperty, GetRoProperty,GetToPrperties. with examples.

6 Answers  


.how will you load the object during runtime

2 Answers   TCS,


How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?

1 Answers  


what difference between client and server applications exatly?

1 Answers   Honeywell,


How to remove associated function library?

0 Answers  


I need your help in the below topic using QTP Automation tool. How to automate the right click of mouse on a context menu? 1)Tried low level recording which is working fine but making use of co-ordinates. 2) Also tried changing the mouse settings and properties using Tools ->WebEvent RecordingConfiguration and created a configuration file with required mouse click events and used which did not work.

1 Answers   AppLabs,


Categories