I am recording on an explorer/tree view where you can right click on the node and bring up a properties popup. The popup header is always labeled 'CaseView Document Properties - ' and then the node name. It seems that I should be able to use the same object from the repository with a regular expression to recognize all these popups, but I keep getting errors. In Winrunner I would have done:
Window("WindowName").Dialog <font color="green"> (!'CaseView Document Properties - .*") </font> WinButton("OK").Click. This is, of course, VBScript - but that does not work. Do I have to use the Regular Expression in the Object Repository, or am I coding the regular exp wrong in VB Script?
seekerkeeper was wrong about Regex in the OR, but his solution with descriptive programming looks valid, if you want to go that way.
jbotash provided the screenshot showing a regex in the OR. To use this feature, simply follow these steps:
1. Learn your object (the dialog box) in your OR as 'CaseView Document Properties - NodeName'.
2. Edit the logical name to make it more sensible, like 'CaseView Document Properties dialog' (this step isn't necessary, but it helps your script makes sense when you're reading through it).
3 Find the property you want to change under the "Test object details" in the OR and click that property in the "Value" column. A little button will appear with a "<#>" symbol on it.
4. Click that button to open the "Value Confiuration Options" popup.
5. Click the Regular Expression checkbox
6. Edit the value right above the checkbox with a valid regular expression.
7. When done, click OK,
8. Test your change by clicking the "Highlight in Application" button on the OR toolbar - if your object in your application flashes for a couple seconds, then you edited the regular expression correctly. If not, then you may have entered an incorrect regular expression.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"