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

how can i pass parameters into function?

4 Answers   Livetek,


What is the difference between QTP 8.2 and QTP 9.2

1 Answers  


suppose in the middle of the project QTP will not work properly, then what do u do? and ur team?

0 Answers  


What is the difference between gettoproperty and settoproperty?Explain with an example?

4 Answers   Satyam, QQS,


Can we directly automate test script according to requirements?

1 Answers  






What are objects? how do you select the unknow object?

3 Answers  


what is meant by source control?

0 Answers   Ordain Solutions,


What is fragmentation and paging?

0 Answers  


what kind of erros can be handled with the using QTP?

2 Answers   Satyam, CTS,


Can we install QTP on remote server and access it as a web application on other system (client place)? If so please let me know. Thanks in advance, Ravi

2 Answers  


Explain about import and export files?

1 Answers  


in flight reservation ex once u login, u go into next window where we hav an option of new, open and help etc.. how to fetch those options and to go to respectiv tab accordingly using qtp.. plz let me knw answer for tis as early as possible. Thanks in advance... asha

1 Answers  






Categories