Micro Focus QTP (UFT) Forums
Regular Expression help - 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: Regular Expression help (/Thread-Regular-Expression-help--4751)



Regular Expression help - mitch - 04-27-2011

Hi,
I'm trying to identify a browser window in one of my tests. The name (property title) changes for each run. An example is:

abc.xyz.123.com:8076/OA_CGI/FNDWRR\.exe?temp_id=111111

The common portion is always:
abc.xyz.123.com:8076/OA_CGI/FNDWRR\.exe?temp_id=

So can I identify this window using a regular expression like this:
Code:
Window("title:=http://abc\.xyz\.123\.com:8076/OA_CGI/FNDWRR\.exe?temp_id=*")
I've put a backslash in front of each period so that they are interpreted literally.

It doesn't work, so I'm wondering if my expression is incorrect, or if I can't do this.

Thanks for any assistance you can offer.


RE: Regular Expression help - supputuri - 04-27-2011

Hi mitch,

My first question is are you sure that the title property value is showing the URL? If, yes then you can use the below code.

Code:
Window("title:=http://abc.xyz.123.com:8076/OA_CGI/.*").Highlight

Please let me know if you need any more information.