SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    web_reg_find Regular Expressions?

    1. What version of LoadRunner (LR) or PerformanceCenter (PC) are you using? (specify which tool LR or PC)
    LR 9.0

    2. What is the protocol you are recording?
    HTTP

    3. If HTML - are you using HTML-Advanced with URLs or,
    No

    4. If URL mode:
    - Concurrent groups, or
    - Without Concurrent groups?
    Concurrent

    5. Which LoadRunner/PerformanceCenter feature (FPs) or service packs are you using?
    None

    6. VuGen Recording - are you using Old or New Recording Engine?
    New

    7. What kind of LoadRunner license do you have -
    - Subscription,
    - Perpetual,
    - Permanent/Unlimited
    - Virtual User days, or
    - Evaluation?
    Subscription

    8. If subscription, is subscription current or expired?
    Current

    9. What platform(s) (PCs) and Operating Systems (Windows-XP, etc.)? Include version and service packs (SP1 or 2, etc.)
    WinXP SP2

    10. If you have filed a service request with HP/Mercury, what have they told you at this point with respect to your issue?
    No


    Need to use web_reg_find, but it doesn't support regular expressions. What do you do in a case like this?
    Text:
    "User 1 xxxxxx Successful"

    The "xxxxxx" could change, so can't be included as part of the search.

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Posts
    1,838
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    web reg find can be parameterised.

  3. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    I could see that working if I knew what's going to be in place of xxxxxx. In this case, I wouldn't know beforehand or would I be able to capture it somewhere else.

  4. #4
    Senior Member
    Join Date
    Dec 2006
    Posts
    1,838
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    Think opposite way, if there is failure,grab that text and fail it.

  5. #5
    Junior Member
    Join Date
    Aug 2005
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    Well, page contents may look like this:
    User 1 xxxxxx Successful
    User 2 yyyyyy Failed
    User 3 zzzzzz Successful

    Searching for "Failed" wouldn't help, since it could be there too on another line.

  6. #6
    Senior Member
    Join Date
    Dec 2006
    Posts
    1,838
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    Well in this case, you will need to grab the entire text in the web reg save param function and process those things with strtok.There are sufficient posts here matching your requirement over here.search for those.Have a look at the code section over here.
    what is your objective here, to find out which users had failed or something else ?

  7. #7
    Senior Member
    Join Date
    Aug 2003
    Location
    Atlanta
    Posts
    777
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    [ QUOTE ]
    User 1 xxxxxx Successful
    User 2 yyyyyy Failed
    User 3 zzzzzz Successful


    [/ QUOTE ]

    Is there any other identifying code surrounding what you want to capture (like tags, formatting identifiers)?

    Will the xxxx, yyyy, zzzz, etc. be the same length every time? If so, you can use the /DIG text flag in web_reg_save_param.

    /DIG is used to interpret the pound sign (#) as a wildcard for a single digit.

    I have worked up an example below, you may need to change it based upon the text that comes after Successful/Failed.
    <font class="small">Code:</font><hr /><pre>
    web_reg_save_param("cSuccessVar", "LB/DIG=User # ###### ", "RB=\"", LAST);
    </pre><hr />

    -Terri

  8. #8
    Junior Member
    Join Date
    Aug 2005
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_find Regular Expressions?

    Thanks I'll try those ideas. Also, thanks terri for /DIG suggestion, never knew it existed. I found it buried in LR Help. Too bad it will only work if length is same every time.
    I'm guessing this will work as well:
    web_reg_save_param("cSuccessVar", "LB/ALNUMIC=User ^ ^^^^^^ ", "RB=\"", LAST);

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:06 PM.

Copyright BetaSoft Inc.