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

Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?

0 Answers   Ness Technologies,


I am new to automation testing.I am learning QTP 9.2.my question is how to install the defferent addins(other than Default Addins) is there any defference in QTP after installing the Addins.where we can get the addins?

0 Answers  


How will you handle application crash using recovery scenario manager(step by step process)?

1 Answers  


How to open a new test using quicktest professional?

0 Answers  


What are the different types of recording modes in qtp? Which will be used when?

0 Answers  






Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.

0 Answers  


To which environments does a QTP support?

1 Answers   Crea,


write a VBscript code to parametrize test script using test data from sqlserver database?

2 Answers   IBM, Polaris,


Is it possible to change the property value at runtime? How it is possible?

0 Answers  


Hi All, I'm Akshaya here, could anybody please help me regarding how to import the excel sheet to run time datatable. But Pl. keep it in your knowledge is that excel sheet is opened. Thanks, Akshaya Madali 9823213538

4 Answers  


How do know the number of browsers opened?

0 Answers  


What r the features of QTP9.2,other than QTP8.0 What r the extre features of QTP9.2.

2 Answers  


Categories