I recorded a Web based Application running on JAVA and when
I went to play them back a week later they didn't run. I
noticed that the Browser was putting in a (Underscore and a
Number) for each line so i re-recorded and noticed the
Underscore line wasn't the same as what i recorded last
week so any script I record today will not work next week
because the browser settings or how QTP recognizes it keeps
changing.

This is the new line
Browser("Bureau of Labor Statistics_4").Page("Bureau of
Labor Statistics").JavaApplet("SurveyApplet").JavaList
("Select an Area").Select "U.S. city average"


This is the old line
'Browser("Bureau of Labor Statistics_3").Page("Bureau of
Labor Statistics").JavaApplet("SurveyApplet").JavaList
("Select an Area").Select "U.S. city average"

Notice the Burearu of Labor Statistics_3 adn Burearu of
Labor Statistics_4. Why does it change and how do I prevent
it from changing.

Answers were Sorted based on User's Feedback



I recorded a Web based Application running on JAVA and when I went to play them back a week later ..

Answer / saroj

You have to use regular expression on the repository for
the browser property ( which is keep changing ).
In your case the property "title" is keep changing so use
regular expression for the title property in the object
repository.
ex: title = "Bureau of Labor Statistic.*"

Is This Answer Correct ?    1 Yes 0 No

I recorded a Web based Application running on JAVA and when I went to play them back a week later ..

Answer / karunesh

For the above problem use the Dscripive programming
with Regular expression

Is This Answer Correct ?    0 Yes 0 No

I recorded a Web based Application running on JAVA and when I went to play them back a week later ..

Answer / bharathi

It will work you just record the whole script once and save
the Object repository. i am also using the record playback
method if u change anything in middle also it is working
for me.

Is This Answer Correct ?    0 Yes 0 No

I recorded a Web based Application running on JAVA and when I went to play them back a week later ..

Answer / sbbceo

I re-record the scripts again and saved them and made sure
the Objects in the Repository were correct and I even
played them back a day later and they worked fine but I
went to replay them yesterday and now all of them stopped
working again. The Browser line has changed again so it
doesn't match whats in the Repository so now all these
scripts I record are No good again. What causes the
Broswer line to change? I'm using QTP 9.5 on IE7 on a Java
Web Based Application. Do you think it's the developers
making changes or is it something QTP is doing each time it
opens up a new browser to play the scripts back. Please
help because this is the 3rd time I've had to RE-Record
these scripts.

Is This Answer Correct ?    0 Yes 0 No

I recorded a Web based Application running on JAVA and when I went to play them back a week later ..

Answer / vandana b

Hi i am very recent to Automation. I am suggesting based on
my practical knowledge i have developed.when the properties
are changes in browser or page or any object. Regular
expressions are quite commonly used to avoid this problem.
please use descriptive programming for better results. for
example let us consider the line u have recorded and i am
regularizing the properties that are changed time to time.

'Browser("name:=Bureau of Labor
Statistics.*").Page("title:=Bureau of
Labor Statistics").etc........

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.

0 Answers  


how to parameterise a test with data base table or excel sheet?

1 Answers   FCG,


How many types of Parameters are available in QTP?

1 Answers  


How do u do batch testing in WR & is it possible to do in QTP, if so explain?

4 Answers  


Explain features of the latest version of qtp/ uft 12.1?

0 Answers  






how to use command prompt using qtp?

8 Answers   HCL,


How do we call Library Files(.vbs) in the Test Script Thanks in Advance...

6 Answers  


how to write script in qtp(vbscript)..i mean with out application deployed..and how to call script1 into script2?

8 Answers   INCA, Infosys, Logix, SLK Software, Symphony, Wipro,


What are the flaws in water fall model and how to overcome it?

0 Answers  


Hi Friends...this is surendra..recently i joined automation team ...Please send me some documents regarding VB script ...and where can i learn VB script... This is My mail id: surendra.mamilla@gmail.com... please send to my mail.... Thanx in advance surendra.

1 Answers  


is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP

5 Answers   IBM,


What does ".mst" stands for? (abc.mst)

3 Answers   Infosys,


Categories