Micro Focus QTP (UFT) Forums
Unable to Record and Run Successfully - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Unable to Record and Run Successfully (/Thread-Unable-to-Record-and-Run-Successfully)



Unable to Record and Run Successfully - dabendschein - 02-19-2008

Hey There;

I have used QTP for quite some time now, but I am running into an issue that i have not seen before, and have not idea how to resolve.

I am creating a regression test for an internal application. I start recording on the initial login page, which is essentially a dialog window from the parent object. The very first time it launches i am able to record just fine. But if i try to record it again, the object name has a _2 after it. And a third time it has _3, fourth time _4, and so on. So the object is continually changing every time it is loaded.

Is there a setting in QTP that will stop this from happening?

I have attached the object repository to actual show you what is happening.

Any help would be greatly appreciated.

Thanks


RE: Unable to Record and Run Successfully - Ankur - 02-19-2008

It seems you are working on multiple instances of your application at the same time... If you have more than one--similar window-- open at any given time then in order to uniquely identify it, QTP has to give it a unique name.

Just work on one instance at a time.


RE: Unable to Record and Run Successfully - dabendschein - 02-19-2008

Thanks for the prompt reply Ankur. Unfortunately i do only have one instance of the application going at a time. One thing i did notice, and I am not sure if this is causing an issue, is the title bar of the application has the date and time in it. So the object is always capturing the date (which will always change) as well as the time (which is always changing). Would this be causing an issue because the stored object in the repository has a date/time of when the actual RUN takes place?

Thanks again for your assistance.


RE: Unable to Record and Run Successfully - Ankur - 02-19-2008

oh yes ...that's the culprit...you should have mentioned that before...but good that you found out Smile

Just make it a regular expression in object repository.

For ex:

if title name is daben122008, click on value > change it to daben.* and check the regular expression check box under it.


RE: Unable to Record and Run Successfully - dabendschein - 02-19-2008

hmmmm...tried that but for some reason it still did not work?


RE: Unable to Record and Run Successfully - Ankur - 02-19-2008

post the screenshot of object repository and regex


RE: Unable to Record and Run Successfully - dabendschein - 02-19-2008

Attached...


RE: Unable to Record and Run Successfully - Ankur - 02-20-2008

I am not able to see the value of regexpwndtitle with .* in it.

You need to take the screenshot of the part which contains .* and then attach again.