SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    web_create_html_param

    I'm having trouble capturing a value in LoadRunner using the "web_create_html_param" function.

    I'm trying to capture a session ID number, or an OID number which is being passed from the server to the client. I've inserted the function statement right before the string is sent and I'm saving it to a parameter named "OID".

    Here's the string the server is sending to the client (loadrunner):

    [INPUT TYPE="HIDDEN" NAME="return" VALUE="1.11.1547"]

    **I couldn't use "<"'s because this website is removing anything between them. I've replaced them with "["'s**

    I've placed the following function statement in my script right before this string is being passed:

    web_create_html_param("OID",
    "NAME=\"object\" VALUE=\"",
    "\">");

    I'm trying to capture the dynamic value which is currently represented (above) by the value "1.11.1547". This changes with each user that passes through the site.

    In my script I've replaced this 1.11.1547 value with the parameter named "OID". Here's one from my loadrunner script:

    ENDITEM,
    "name=object",
    "value={OID}",
    ENDITEM,
    "name=return",
    "value={OID}",

    When I run the script I get the following in my Execution Log (VUGen - validate script):

    Action1.c(42): The test step: "Submit Form: CspaceClone" succeeded.
    Action1.c(47): Saving Parameter "OID = "
    Action1.c(47): Registered search parameter "OID" with boundaries ("NAME="object" VALUE="" and "">").
    Action1.c(50): Starting Step - "URL: Present".
    Action1.c(50): The test step: "URL: Present" succeeded.
    Action1.c(50): The parameter OID was not found. Possible reasons: 1) The boundaries do not exist. 2) The length of the parameter exceeds the maximum permissible length. Use web_set_max_html_param_len to increase this value.
    Action1.c(57): Starting Step - "URL: PresentAddressBookUsers".
    Action1.c(57): The test step: "URL: PresentAddressBookUsers" succeeded.
    Action1.c(64): Starting Step - "Submit Data: gm".
    Action1.c(64): Parameter Substitution: parameter "OID" = ""
    Action1.c(64): Parameter Substitution: parameter "OID" = ""
    Action1.c(64): Step Error: 404 - Not Found
    -16985 : Failed to end Transaction Action1_Transaction (by name).

    As you can see it's not capturing the value or sending it where I've placed the Parameter.

    When establishing the properties of the parameter, should the parameter be set to read from a "file"? I assume so. When the script runs it will create a temp file with the captured value in it, right? There is no need to worry about if it reads from this file Sequentially, or if it selects a Unique Value, or any of that, right?

    Why isn't it capturing this value? I've captured all of the responses returned by the server in the log and the script is solid...

    help?

    Thanks.

    Tim


    ------------------


    [This message has been edited by tharmsen (edited 01-10-2002).]

  2. #2
    Senior Member
    Join Date
    Sep 2001
    Location
    Schenectady, NY, USA
    Posts
    138
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_create_html_param

    That means you did not place the parameter to capture the value in the right spot. Comment this parameter and replay the script with all original values and Extended logging turned ON. After execution, find out the line number of the value on its first occurance in your execution log and place your parameter right before that line number in your script. You can also get your left and right boundaries from this line. This will definitely capture your value.
    Remember if your script contains multiple items with the same left and right boundaries, web_create_html_param() cant capture the value. You need to use web_create_html_param_ex() or web_reg_save_param() according to your requirement. Thanks.

    ------------------

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

    Re: web_create_html_param

    >When establishing the properties of the parameter, should the parameter be set to read from a "file"?

    Tim, sounds like you're making the same mistake I made. You don't need to use properties. Once you're successful in defining OID, you simply need to put {OID} in your script in place of the literal value. You only use "File" if you're supplying a list of values in an external data file.

    If you're getting the message "The parameter OID was not found. Possible reasons:.." message, either your boundaries are not working or you need to insert web_set_max_html_param_len before web_create_html_param. You only get 256 chars or something by default.

    Try printing it out with lr_message(lr_eval_string("{OID}")) til you're sure you've got it.

    Good luck!

    -joel


    [INPUT TYPE="HIDDEN" NAME="return" VALUE="1.11.1547"]

    ------------------

  4. #4
    Junior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_create_html_param

    Thanks for the help. I do know where the value is being sent as I've enabled the logging and can see it coming through.

    I created the LR statement just before the first (only) instance. I also followed Joelrranson's advice and just inserted the {OID} where the value was that I wanted to replace with the captured value.

    Here's the errors I'm getting:

    Action1.c(547): Informational: Registering web_create_html_param was successful
    Action1.c(551): Error: HTTP Status-Code=400 (Bad Request) for http://i5front.ny.agency.com/CspaceC...clonedRoot&obj ect=%7BOID%7D
    Action1.c(551): Warning: No match found for the requested parameter "OID". The parameter has been emptied. If the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size.
    Action1.c(551): Informational: web_submit_data highest severity level "ERROR", 0 data bytes, 193 header bytes, 0 overhead bytes

    I can't seem to capture this little bugger.

    ------------------

  5. #5
    Junior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_create_html_param

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by joelransom:
    >When establishing the properties of the parameter, should the parameter be set to read from a "file"?

    Tim, sounds like you're making the same mistake I made. You don't need to use properties. Once you're successful in defining OID, you simply need to put {OID} in your script in place of the literal value. You only use "File" if you're supplying a list of values in an external data file.

    If you're getting the message "The parameter OID was not found. Possible reasons:.." message, either your boundaries are not working or you need to insert web_set_max_html_param_len before web_create_html_param. You only get 256 chars or something by default.

    Try printing it out with lr_message(lr_eval_string("{OID}")) til you're sure you've got it.

    Good luck!

    -joel


    [INPUT TYPE="HIDDEN" NAME="return" VALUE="1.11.1547"]

    <HR></BLOCKQUOTE>

    I've inserted the web_create_html_param right before the point in the script where the server returns the hidden value. Granted, a bunch of other stuff is coming down with it, but I assume that's ok. I assume LR will parse through the stuff being returned by the server looking for the left and right boundaries and ultimately the data I'm looking to capture.

    When I put the {OID} where the values are I'm trying to replace with the captured value, it doesn't work. There are two fields which require the new data, one right after the other:

    ENDITEM,
    "name=object",
    "value={OID}",
    ENDITEM,
    "name=return",
    "value={OID}",
    ENDITEM,

    Heck, here's the whole darn thing showing you what I've put in my script:

    web_create_html_param("OID",
    "<INPUT TYPE=\"HIDDEN\" NAME=\"object\" VALUE=\"",
    "\">");

    web_submit_data("gm",
    "Action=http://i5front.ny.agency.com/gm/",
    "Method=POST",
    "TargetFrame=",
    "RecContentType=text/html",
    "Snapshot=t8.inf",
    ITEMDATA,
    "name=stepNumber",
    "value=1",
    ENDITEM,
    "name=fromStep",
    "value=0",
    ENDITEM,
    "name=carry",
    "value=true",
    ENDITEM,
    "name=format",
    "value=Customer_accountAdmin2.shtml",
    ENDITEM,
    "name=context",
    "value=1.11.122",
    ENDITEM,
    "name=object",
    "value={OID}",
    ENDITEM,
    "name=return",
    "value={OID}",
    ENDITEM,
    "name=TargetType",
    "value=AccAdmin",
    ENDITEM,
    "name=name",
    "value=Tim_cspace_test01",
    ENDITEM,
    "name=attrvalue_of_accStatus",
    "value=prospect",
    ENDITEM,
    "name=attrvalue_of_industry",
    "value=Alcholic Beverages",
    ENDITEM,
    "name=attrvalue_of_addr1",
    "value=",
    ENDITEM,
    "name=attrvalue_of_addr2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_addr3",
    "value=",
    ENDITEM,
    "name=attrvalue_of_country",
    "value=",
    ENDITEM,
    "name=attrvalue_of_city",
    "value=",
    ENDITEM,
    "name=attrvalue_of_state",
    "value=",
    ENDITEM,
    "name=attrvalue_of_zip",
    "value=",
    ENDITEM,
    "name=attrvalue_of_phone1",
    "value=",
    ENDITEM,
    "name=attrvalue_of_phone2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_fax",
    "value=",
    ENDITEM,
    "name=attrvalue_of_url",
    "value=",
    ENDITEM,
    "name=attrvalue_of_accFacts",
    "value=",
    ENDITEM,
    "name=attrvalue_of_customField1",
    "value=test",
    ENDITEM,
    "name=attrvalue_of_customField2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_customField3",
    "value=",
    ENDITEM,
    "name=attrvalue_of_customField4",
    "value=",
    ENDITEM,
    "name=attrvalue_of_customField5",
    "value=",
    ENDITEM,
    "name=attrvalue_of_keyMeta",
    "value=",
    ENDITEM,
    "name=attrvalue_of_acquisitionDate",
    "value=",
    ENDITEM,
    "name=attrvalue_of_acctBrandingLogo",
    "value=",
    ENDITEM,
    "name=attrvalue_of_acctGatewayExtranet",
    "value=",
    ENDITEM,
    "name=leadInt",
    "value=Jack Bean",
    ENDITEM,
    "name=attrvalue_of_accLeadInt",
    "value=1.59.29",
    ENDITEM,
    "name=leadExt",
    "value= ",
    ENDITEM,
    "name=attrvalue_of_accLeadExt",
    "value=",
    ENDITEM,
    "name=attrvalue_of_url1",
    "value=",
    ENDITEM,
    "name=attrvalue_of_headline1",
    "value=",
    ENDITEM,
    "name=attrvalue_of_source1",
    "value=",
    ENDITEM,
    "name=attrvalue_of_date1",
    "value=",
    ENDITEM,
    "name=attrvalue_of_url2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_headline2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_source2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_date2",
    "value=",
    ENDITEM,
    "name=attrvalue_of_url3",
    "value=",
    ENDITEM,
    "name=attrvalue_of_headline3",
    "value=",
    ENDITEM,
    "name=attrvalue_of_source3",
    "value=",
    ENDITEM,
    "name=attrvalue_of_date3",
    "value=",
    ENDITEM,
    LAST);

    Now, I've also tried creating a "file" in the properties of the paramter. I assume the web_create_html_param will write the captured value to this file and both instances of the {OID} paramater above will be replaced with this value... but it's not. I get this reoccuring error in my log:

    Action1.c(68): Registered search parameter "TIMOID" with boundaries ("<INPUT TYPE="HIDDEN" NAME="object" VALUE="" and "">").
    Action1.c(72): Starting Step - "Submit Data: gm".
    Action1.c(72): Step Error: 404 - Not Found
    Action1.c(72): The parameter TIMOID was not found. Possible reasons: 1) The boundaries do not exist. 2) The length of the parameter exceeds the maximum permissible length. Use web_set_max_html_param_len to increase this value.
    -16985 : Failed to end Transaction Action1_Transaction (by name). [MsgId: MERR-16985]

    No matter what I do I can't get it to replace these values with anything.

    What am I missing here?

    Any help would be greatly appreciated.



    ------------------

  6. #6
    Junior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL, USA
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_create_html_param

    I finally got it working, thanks everyone.

    I had to use the "file" function where it saved the parameter data to a file, but it's now working... to a degree.

    Last night I ran two sets of tests and all the user accounts were created and no errors were encountered. Today I start again, having changed nothing, and now I get these errors in my Controller execution log:

    Error -10487 : Exception was raised when calling event-notify vuser function in extension parameng.dll: System Exceptions 0xc0000005: EXCEPTION_ACCESS_VIOLATION

    Any idea what is causing this?

    ------------------

 

 

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 12:10 AM.

Copyright BetaSoft Inc.