QTP Forums

Full Version: Changing window titles
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
can you tell us what have you tried with regular expression?
have you tried setting this
for regexpwndtitle = .*
Text = .* -Control Designer (if Control designer is static)
does this work?
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.
Reference URL's