| || |
Regular Expression in 9.0
I would like to use regular expression for an object in QTP 9.0 for which the innertext will change. For instance, If I set EMPTY zip code, I will get "Enter Zip Code" error message and If I set "abcde" I will get "Invalid Zip Code". I need to have only one object in Object repository for which the innertext whold be different.
Please let me know what should I do to fix this issue.
Re: Regular Expression in 9.0
I don't think, you need Regular Expression for this task.
You need one WebEdit object in Repository. Get it by recording entering value into this box just once. Don't record as many time, as you need to to verify different values. You'll do it in script itself.
Check, how it looks in your Repository. If there is innertext as property, delete this recognition (innerText). It would be enough another properties for QTP to recognize this object.
Then, in your script, just write:
'Do whatever you need to verify empty entry
'Do whatever you need to verify wrong value
'Do whatever you need to verify correct value