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.
Answer Posted / 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 View All Answers
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
What is the use of an object spy tool in qtp?
Explain the checkpoint in qtp?
Can we Test Welcome Screens and Process Images with QTP
how can we preform retesting(DATA driven test) using function please gine the code for loginpage
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
What do you mean by checkpoints in qtp?
Differences between quicktest professional (qtp) and winrunner?
Shall we add Local Repository to shared object repository,if yes,how we add
What r the different filters in defect in quality center
How many add-ins comes by default with quicktest professional (qtp)?
What is the difference in the global and action sheet in qtp?
How to find the name of the machine where you are running your automation scripts in qtp?
Where we can use the analog mode and where we can use the low – level mode?
What are the views available in qtp?