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

1. How can we use same object repository and Testscript which is in English flavor to check the application in different languages thru QTP?(Chinese,Dutch,French) - I generated script in english and want to use the same script with different languages? - for windows i used regular expressions - I need for edit box,button and combobox, (English,French,Dutch,Chinese) These are the properties of a button in different languages Properties English Dutuch Chinese French x 400 758 631 601 y 673 603 592 676 windowstyle 1342242816 1342242816 1342242816 1.34E+09 windowid 2 2 2 2 windowextended style 4 4 4 4 width 120 120 120 120 visible TRUE TRUE TRUE TRUE righttoleft reading FALSE FALSE FALSE FALSE righttoleftlayout FALSE FALSE FALSE FALSE rightaligned FALSE FALSE FALSE FALSE regexpwndtitle cancel Loschen Chinese language Annuler regexpwndclass button button button button objectclass button button button button hwnd 132872 657228 656932 656782 height 33 33 33 33 focused FALSE FALSE FALSE FALSE enabled TRUE TRUE TRUE TRUE attached text abs_y 669 599 627 597 abs_x 396 754 588 672 text cancel Loschen Chinese language Annuler nativeclass button Button ordinal Identifier type,Value none none none none smartidentification FALSE FALSE FALSE FALSE comment

1 Answers   TCS,


How to connect to a database?

0 Answers  


After running scripts how you report results ,there is any specific report form

1 Answers  


if mandatory and Assitive propertys are shows same how will u write skript in QTP window

0 Answers   Wipro,


Please mail me the license key of QTP 9.5 t v.sadangi@gmail.com ????? thx

0 Answers  






How can we use XML in QTP?

1 Answers  


In a yahoo web Application there are 65 links.one day it will opens 50 links and another day it will open 55 links.In this scenerio write Descriptive programing for Automation?....Pls write the code for this scenerio.

1 Answers   College School Exams Tests, UHG,


How to change the Default synchronization method time and where?

4 Answers  


Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..

0 Answers  


Any one please tell me how to create framework in QTP (in detail). Is there any website for reference?

1 Answers  


Discuss quicktest professional environment?

0 Answers  


Hi Friends, while playing the recorded test i am getting this error "Cannot identify the object "q" (of class WebEdit). Verify that this object's properties match an object currently displayed in your application." error is coming in this line of code "Line (2): "Browser("Google").Page("Google").WebEdit("q").Set "airtel broadband"". " .... please tell me how to overcome this problem. need help asap... Thanx in advance

3 Answers  


Categories