i have a window that changes its caption depending on what child dialogs are open. it will either be something like one of the following three:
App AAA and BBB
i set up the window's regexpwndtitle property as follows...
1. selected radion option for "Constant" and checkbox "Regular Expression".
2. entered text of "App (AAA and BBB)|(AAA)|(BBB)"
however, this doesn't seem to work. if the window caption is "App AAA and BBB", it recognizes it, but if the window caption is "App AAA" or "App BBB" it fails to identify it. i tested my regular expression outside of QTP and it seems to work fine. am i missing something here or is this a problem with QTP?
Re: regular expression for regexpwndtitle not working
You would do this in the Object Repository.
In your OR, select your window then highlight the regexpwndtitle Description Property and click the little # button that appears on the right hand side of the value column for that property.
This opens the Value Configuration Options popup window.
Choose the Constant RadioButton and put a check in the Regular Expression checkbox, then enter your regular expression in the edit box.
Click OK and then in your OR click the "Highlight In Application" button to make sure your window flashes on the screen so you know you entered a valid regular expression. If it doesn't flash, you need to fix your RegEx.