SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    lr_get_attrib_string

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

    2. What is the protocol you are recording?
    (Click and Script protocol, GUI)

    2.1 If .NET, which version of .NET does the app require?
    N/A

    2.2 If .NET, which version of .NET do you have installed?
    N/A
    3. If HTML - are you using HTML-Advanced with URLs or,
    NO

    4. If URL mode:
    - Concurrent groups, or
    - Without Concurrent groups?
    (indicate which)

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

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

    7. What kind of LoadRunner license do you have -
    - Subscription,

    (choose the one that fits your license model - (substitute your answer here))

    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.)
    (Window 2003)

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

    I don’t think I need to do this for this problem
    ************************************************** ********

    I will like to use this function “lr_get_attrib_string” to capture a value from the run time setting, so that if “lr_get_attrib_string” is equals to an integer from the get attribute run time settings, some actions will be performed if not then nothing happens.

    So here is my code, below. It compiles but does not perform the action. Help will be highly appreciated or even possible an alternative way to do this without using the parameter files from the .txt or .dat files.. Thanks again for ur help.

    My code below..Remember in the run time settings, my get attribute is set to (AAA) and the value = 2;

    if ((lr_get_attrib_string("AAA")) == lr_get_attrib_string(lr_eval_string("2")))

    {

    Do this

    }

    else
    {
    Do that

    }

  2. #2
    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: lr_get_attrib_string

    I think your code needs minor modification, try this and see if it helps:

    <font class="small">Code:</font><hr /><pre>
    if( strcmp(lr_get_attrib_string("AAA"),"2") == 0)
    {
    // do this
    }
    else
    {
    // do that
    }
    </pre><hr />

    -Terri

  3. #3
    Member
    Join Date
    Jan 2007
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: lr_get_attrib_string

    Terri

    Sorry for late reply..It did work..Thanks a lot!!!

    By the way, why did you make that function all equals to 0??
    Although it worked, I am not exactly sure what "0" is doing in the code above..

  4. #4
    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: lr_get_attrib_string

    Look up strcmp in the function reference and you will find your answer.

    -Terri

 

 

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 11.54%
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 02:18 PM.

Copyright BetaSoft Inc.