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 |
Hello! i am having two comboboxes.Each having 10 items in it.when i select first item in first combobox,it is not similar in the second combobox.for ex in first combo if it is Hyderabad,in second it should be some chenai or some other item .Write a VBSCRIPT for that?
what is the difference between Reusable action and external action?
what is the extension of action script template?
Hi I am working with QTP.If I want to write a certification exams,Which one is the best one suggest me friends!!
how to get no.of non empty rows in a excel sheet through vb-script
In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.
wt is automation framework? give explonation?
How do you do batch testing in QTP, if so explain?
can any one give me the doccument how to test aproject developed in java language in qtp can here can we use the general vb scripting or we have to use java script here if we have to ese the java script here can any one send me the manual for it means how to write descriptive programming for it thanks in advance
I install .Net Add-Ins in my system. It installed properly. But all the objects are recognizing as window objects only. But it has to recognize as swf objects. In Record and Run setting i selected 'Record and run test on any open browser' and Record and run test on any open Windows-based application' Can any one tell what setting i have to do to recognize objects correctly as swf...? Please give some suggestions..?
What is qtpro? What is quick test pro?
what is the Vbscript to connect Database