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 |
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
how to test globalisation testing using qtp? lets take an example: suppose i have to test the word is in hindi "ratikanta", how we test it by using descriptive programming or any method??
If 2 gmail browsers are opened in our system, how to enter the mail id and password into second browser by using discriptive program?
how to get the data from a winedit box in vb scripting and store it in a variable if data contains "_"(i.e data is TEST_1)
What is the difference between low level recording and virtual object.
How many types of OBJECTS are there in QTP?
8 Answers Intel, Inter Globe Technologies,
I came across Good question ..... Write a script to only download pdf's if there are 20 links on a page. Kindly reply these type of questions are pretty challenging..
How to compare the two strings?
what is the Command used to start the QTp from Run.(start-> Run)
There are 4 webpages in an application, in third page there is one cancel button i want to click that cancel button only, how can I click that cancel buttton ?
I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.
What is the difference between qtp and selenium?