Results 1 to 3 of 3

Thread: Qtp

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Answers
    3

    Qtp

    Hello All ..
    I am new to QTP...I know we can handle an application whose name is frequently changes by using regular expressions..but how?Is there any formate or script for that?


  2. #2
    Junior Member
    Join Date
    Oct 2007
    Answers
    9

    Re: Qtp

    Hi,

    Depends on requirements regular expressions can be used and these are some examples,

    This can be used when full word name changing,

    \w – its matches to any alphanumeric characters and underscores (A-Z, a-z, 0-9, _).
    Example: \w{6}matches abcde4, 1hjdbn, gh3jj_, a_M_yz.

    This can be used when beginning or end of the character is changing,

    A Period (.) matches any single character of the word except \n.

    Example: receive. Here matches received, receives or receive followed by space or single character.


    Hope this may helpful for your requirements.

    Regards,
    Vasanth


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

    Smile Re: Qtp

    hey Dave,

    Adding to what vasnath has jotted down, try using wildcards as well -

    You could use ' ? ' and ' * ' as well with expressions.
    For instance you want to capture a window name that keeps changing frequently like - Win5786.
    The numeric 5786 could keep changing with every refresh operation or every action.

    So in such cases, we change the Window name to a regular expression -
    Name = "Win*".

    This would accept all recognize all windows starting with Win and followed by characters.

    Incase you want to use specified character lenght use the ? character.

    Cheers


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