Results 1 to 7 of 7

Thread: Problem with window recognition

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Answers
    1

    Question 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 ?


  2. #2

    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..


  3. #3
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    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.....


  4. #4
    Moderator
    Join Date
    Sep 2006
    Answers
    920

    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.

    Regards,
    Brijesh Jain
    ---------------------------------------------------------
    Connect with me on Skype: jainbrijesh
    Google Plus : jainbrijeshji

  5. #5
    Junior Member
    Join Date
    Jan 2008
    Answers
    18

    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


  6. #6

    Re: Problem with window recognition

    plz let me know the result


  7. #7

    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.*


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact