Micro Focus QTP (UFT) Forums
Not able to recognise browser - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Not able to recognise browser (/Thread-Not-able-to-recognise-browser)



Not able to recognise browser - Supriya3072 - 09-07-2010

Hi, I am trying to script for a web application using DP. The web browser title has test environment version name along with the timestamp. When I record the actions, it records following properties of the browser: Name, title, ( both the properties have timestamp in them which refreshes everytime you navigate), openurl (which is url of the page). When I use these properties in DP, it throws error that browser cannot be found. I have used all available properties which QTP has recorded when I record the actions; I have also tried updating Base Filter properties to add 'openurl" property as base property. The same approach has worked well for other web apps in the suite. It is only this app that we are not able to automate for. Any sugeestions? Someone had suggested patch (QTPWEB_00037); which is not available on HP site anymore.


RE: Not able to recognise browser - cdesserich - 09-08-2010

You can use regular expressions to ignore the timestamp part of the title and name. For example, if your browser title is "Project Title - September 7, 2010, 15:48:45 GMT" you can change the property to be a regular expression like, "Project Title - .*". There are several ways to "tighten" up that regular expression, but I won't go into detail. There are several good resources on regular expressions like: https://www.learnqtp.com/regular-expressions-regularized/