Problem with window recognition
My application has a form with a name who has a window name. I have recorded this form day by day until I discover that window name changed because it has a date in this name. I saw something about the use of regex in QTP. The property regexpwndtitle changes everyday. COFPV235.18 10/03/2008 , COFPV235.18 10/04/2008 and so on. I'd like to make a regex using COFPV235.18 * like pattern. I have tried chaging the property name at Keyword view but It doesn't work when I playback QTP. When I put the window's name correctly, it works. What happens ?
Re: Problem with window recognition
Plz try with *.* instead of *
else you can fetch the system date in day/month/year format
concatinate this with the form name and proceed..
Re: Problem with window recognition
Hi,
Try using a regular expression for Date part like this -
[0-1][0-9]/[0-3][0-9]/200[0-9]. This regular expression is for mm/dd/yyyy format and for year 2000. Append this to the Already displayed text in the regexpwndtitle property.
Cheers.....
Re: Problem with window recognition
Don't mind dear spitzman, but why you are giving so stress to name , whereas you have other proeprties for identification of an object.
If name is doing problem, leave it and tell QTP to identify the form with optional properties.
Re: Problem with window recognition
As regexpwndtitle property is not consistent. Any other property of the window which is unique can be considered for identification.
Regards,
MaluR
Re: Problem with window recognition
plz let me know the result
Re: Problem with window recognition
You can use bizzzzzare's code and take care of the date part.
You can also do it this way:
COFPV235\.18.*