hi all
QTP recognizing objects
as "string_1","string_2","string_3","string_4" like that
but when using FOR LOOP for these.QTP not proceeding further
can i declare these _1,_2,_3,_4 as a single variable




Answers were Sorted based on User's Feedback



hi all QTP recognizing objects as "string_1","string_2","string_3",..

Answer / sachin

hey,

i have answer to this question.

i too have faced a similar kind of issue when looping
throgh a process while clisk on a link in page..

As stated in the question that values are changing
as "string_1","string_2","string_3","string_4" this is
mainly because the index value is changing..

Note : go to repository for string_1 and check the index
value , likewise check the index value for string_2 and
string_3..check if all three have an oderly increments like
for string_1 the index value in object repository will be 1
and string_2 should be 2.. and so on.

All to need to do is consider one recorded object either
srting_1 or string_2 .. or any one amoung the four recorded
object .. After loop completed one iteration and moves to
second iteration, jst set the index value of selected
object to 1, 2.. and so on ..Use SetTo property method to
set the index value ..

Do let me know if u have any problem's

Thanks
Sachin.

Is This Answer Correct ?    0 Yes 0 No

hi all QTP recognizing objects as "string_1","string_2","string_3",..

Answer / sandipgami84

u can use Refular Expression
string_1,
string_2,
string_3,
string_4,

string_ Is Same... Not Change

string_.* u USE.....

Is This Answer Correct ?    0 Yes 0 No

hi all QTP recognizing objects as "string_1","string_2","string_3",..

Answer / dimple

As per my understanding in for loop qtp is loosing the
object property.
so set the property value again in for loop and try.

Please correct me if iam wrong.

Is This Answer Correct ?    0 Yes 0 No




hi all QTP recognizing objects as "string_1","string_2","string_3",..

Answer / ramchandra patil

u can use Regular expressions and iterate through loop.No
need to declare four variables.


Let me know if u need code.



Ramchandra Patil
9699851282

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More QTP Interview Questions

Check point what is how many types of checkpoint and explain

3 Answers   Accenture,


what is the syntax or command in vbscript to display user message example i want to display "welcome to QTP".

3 Answers  


I have a list box which contains duplicate values e.g. A,A,A,B,B,B,C,C,C.Now write a code in qtp to test the list box . Scenario #1 : I have to check whether any values are there? Scenario #2 : If duplicate values are there,then how many time it is getting duplicated? Svenario #3 : how can I test presence of items in list box ommiting duplicate values?

6 Answers   NIIT,


what is recovery scenario in QTP? what is the need of the recovery scenario in QTP? what are the advantages of the recovery scenarios in QTP?

3 Answers   CTS,


wt is memory leakage?

6 Answers   BSL,






Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.

1 Answers   Cap Gemini,


How we can do Batch testing in QTP?

6 Answers   Kanbay,


Explain about reusable actions?

3 Answers   IBM,


How to make "TEST Batches" in manual testing . How it is possible plz explin in detail?

1 Answers  


How vl i prioritize the actions when i have 10 actions A1, A2, A3......A10. I want to run action as follows A1,A5,A6 and A10. How i can do it. Thanks in Advance to u.

7 Answers   IBM, Wipro,


what are the frame work models of qtp?which frame work you follow in your company?and explain it process?

0 Answers   Covansys,


Please explain me in detail! How to handle runtime errors in QTP useing recovery senario or with out scenario

5 Answers   Quinnox,






Categories