Micro Focus QTP (UFT) Forums
Changing window titles - 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: Changing window titles (/Thread-Changing-window-titles)



Changing window titles - smohile - 09-25-2009

I have a windows application that keeps changing its name. Though all the rest of the properties are the same the the text property and regexpwndtitle property keeps changing I have tried a few things with the regualr expressions but nothing seems to work.

If a project is open in the application the then Text property says Project-Control Designer and the regexpwndtitle says Project. Every new indow requires a new obect in the repository. I have been trying to add regualr expressions to the These two properties such that I can use the same object for any project. I havent had any success.

What can I Do?
(Project is a variable that keeps changing)

regexpwndtitle = Project
Text = Project-Control Designer


RE: Changing window titles - Saket - 09-25-2009

can you tell us what have you tried with regular expression?
have you tried setting this
Code:
for regexpwndtitle = .*
Text = .* -Control Designer (if Control designer is static)
does this work?


RE: Changing window titles - qatestbrian - 10-21-2009

You could also use descriptive programming to identify other properties of the object you are looking for and totally ignore the "name" property. I have found this can cause optimization issues but if you order your selected properties correctly it can help to alleviate this problem. Just one more possible solution.