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

I want to open a GOOGLE page without recording a test in QTP.Can any one answer me?

4 Answers   IBM,


How u call functions in QTP Function to calculate the length of characters in a word -

5 Answers  


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

0 Answers   Accenture,


What is Port testing. Whhen will you perform?

0 Answers  


What is the registration process and examination fees?

0 Answers  






in a web page How to check and display a particular word from a paragraph?

0 Answers  


Differentiate the type of test cases which can be automated and which cannot be automated?

0 Answers  


i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording

3 Answers   Semantic Space,


Do you support automated testing? Why?

0 Answers  


Could someone explain me how to work on Out put values, explain with some example on Flight Reservation. I want to insert the out put value for the order No. Please explain the steps with some example.

2 Answers  


How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?

0 Answers  


does test plan is in test strategy or test strategy is in test plan

2 Answers   Tanla Solutions,


Categories