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

Hi All, I am using QTP for one of the Desktop application which uses Keyboard inputs like 'Tab ,F7 etc' and also mouse (Click). After recording when i am running the Script ,it is not able to recognize the keyboard inputs like F7,Tab and mouse Click because of which either i have to skip that part or manually do the inputs. Please answer how can i make script more flexible so that it will recognize both keyboard and mouse operations.

3 Answers  


whai is meant by automation testing?

6 Answers  


difference between recording methods and recording modes in QTP

5 Answers   Ordain Solutions,


how you test broken link using the automated tool QTP ?

4 Answers   Oracle,


Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me suggestions?

3 Answers  






anyone can explain the following concepts. 1.diff b/w Linear and modular framework 2.diff b/w keyword and hybrid framework

1 Answers  


What is the difference between link and hyperlink?

1 Answers  


Hi,All How to create a link in excel sheet using qtp

0 Answers  


write a regular expression pattern for xyz?123?

1 Answers   FAI,


What is iteration? How it is related to Test Results in QTP?

2 Answers  


Which line will be executed 1-B(DP).P(OR.link(DP) 2-B(OR).P(Or).Link(DP)

2 Answers   Broadridge,


How can you handle exceptions in qtp?

0 Answers  


Categories