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
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 |
Answer / karunesh
For the above problem use the Dscripive programming
with Regular expression
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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 |
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 |
Explain quicktest professional (qtp) testing process?
what is the purpose of SetTOProperty Method?
1 Answers Cap Gemini, iGate, Wipro,
what is the another name for blackbox testing?
if full in Object Repostoiory then how to load other Object Repository
How to get popup error message.
what is the use of automation frame work ??(QTP)
What is a recovery scenario?
how can i impliment error handling in QTP?
actually how many hours per one day we will work on automation (qtp) in real time
How to call script1 into script2?
What is the exact difference bet function and action in QTP Anybody can explain it in detail..Thanks in advance..
is it possible to change the date format like MM/DD/YY into DD/MM?YY through script in QTP