Micro Focus QTP (UFT) Forums
Identify browsers with title property - 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 Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Identify browsers with title property (/Thread-Identify-browsers-with-title-property)



Identify browsers with title property - swame_sp - 09-17-2008

Hi,

My application is web-based. During the execution i will have more than a couple of browser. They differ in their "title" property.

Now i need to work on all the browser has the title as "sample.com". Instead of collecting all the browsers and verifying the title of each of them and work on them if the title is "sample", I wanted to define the title value in the object description itself.

Is it possible to use a kind of simple regular expression in object descrption.

So that i can look for the browsers with titles as "sample.com".
Actual title is "www.sample.com" and few of the other possible titles are "www.sample1.com", "www.sample2.com"
It will be better if i can choose the browsers that has the title as "sample" .

I tried as:
Code:
Set brsdesc= description.Create()
brsdesc("micclass").value="Browser"
brsdesc("title").value=".*" & "sample"& ".*"

But the browser was not recognized.

How can i achieve this within the object description.


RE: Identify browsers with title property - yana - 10-03-2008

Try:

Code:
Set brsdesc= description.Create()
brsdesc("micclass").value="Browser"
brsdesc("OpenURL").value=".*sample.*"