Results 1 to 7 of 7

Thread: Unable to Play Back in QTP

  1. #1

    Unable to Play Back in QTP

    I recorded one scenario lets say for example Incomming Email messages. When recording, the email box might show 10 emails new. When I re-run the same it tunrs out to be 20. How do you take care of this situation ? what testing methodology should be used? Can anyone explain?


  2. #2

    Re: Unable to Play Back in QTP

    Have you received any new e-mail since you last recorded your script?


  3. #3

    Re: Unable to Play Back in QTP

    Yes New emails are received. It fails while reexecuting bcos the old count was 10 new is 14. Its failing.


  4. #4

    Re: Unable to Play Back in QTP

    You can substitute the recorded value (10 -> [0-9]+) with a regular expression so no matter what the value is, it will pass.


  5. #5

    Re: Unable to Play Back in QTP

    Will the expression work if it goes beyond 100 emails too? What kind of programming technique is this? Can u please elaborate this? I mean nowin my case it is 10 if I receive more than 100emails since its testing... will the below expression 10-> 0-9+work? Iam just curious


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

    Re: Unable to Play Back in QTP

    Hi,

    To just add to what Anshoo has already answered to use Regular expressions,

    Incase you wish to proceed further than 100 mails, enhance your regular expression to contain [0-9][0-9] and further on.....

    Cheers...


  7. #7

    Re: Unable to Play Back in QTP

    You can use [0-9]+ or \d+ to match any whole number.


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