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
    Sep 2006
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Problem with web_reg_save_param

    Hi,
    Iam trying to capture the last trade value from

    http://finance.yahoo.com/

    for a company say,MTR

    Enter URL http://finance.yahoo.com/ and enter "MTR" in Get Quotes
    text box and click on the GO button,the streaming quotes page
    is displayed and Iam trying to capture Last Trade value for
    MTR company,

    I tried with the following code snippet based on html code from view source
    and it is not working

    web_reg_save_param("lt", "LB=<span id=\"yfs_l10_mtr\">","RB=</span></b></big></td></tr><tr><td","Ord=1",LAST);


    No match found for the requested parameter "lt". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 1024 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-26377]
    Action.c(26): web_url("YF1") highest severity level was "ERROR", 50339 body bytes, 4394 header bytes, 16 chunking overhead bytes [MsgId: MMSG-26387]

    I have been working really hard on this,
    any help will be greatly appreciated.

    thanks

    Smith

  2. #2
    Senior Member
    Join Date
    May 2005
    Location
    England
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with web_reg_save_param

    as the error message says, the parameter is too big (13k here), you're matching the first left boundary with the second right boundary.
    you might want to match just the 2nd match for l10_mtr like so-
    <font class="small">Code:</font><hr /><pre>
    web_reg_save_param("lt", "LB=&lt;span id=\"yfs_l10_mtr\"&gt;","RB=&lt;/span&gt;","Ord=2",LAST);
    </pre><hr />
    otherwise you can make the maximum parameter size bigger than 4k, using web_set_max_html_param_len(15000) or something
    04h

  3. #3
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with web_reg_save_param

    No need to increase max param length.

    Try this, if using MTR:

    web_reg_save_param("LastTrade",
    "LB= &lt;/small&gt;&lt;big&gt;&lt;b&gt;&lt;span id=\"yfs_l10_mtr\"&gt;",
    "RB=&lt;",
    LAST);

    Make sure you have delete all cookie statements and redirects. Of course, if you are recording in url mode, you may need to correlate much more.

    Are you performance testing for Yahoo? If not, it is not a good idea to put load on them without permission.

  4. #4
    Junior Member
    Join Date
    Sep 2006
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with web_reg_save_param

    Hello Jake,
    I tried your approach,but its still giving the same error message.

    In the left boundary

    "LB= &lt;/small&gt;&lt;big&gt;&lt;b&gt;&lt;span id=\"yfs_l10_mtr\"&gt;",

    it ends with mtr right?,this ending value is dependent on the company name.For example for the company DBY,the LB would end with dby as yfs_l10_dby,

    hope this helps in some way,should we use regular expressions?

    thanks
    Smith

  5. #5
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with web_reg_save_param

    [ QUOTE ]
    ...
    Make sure you have delete all cookie statements and redirects. Of course, if you are recording in url mode, you may need to correlate much more.

    Are you performance testing for Yahoo? If not, it is not a good idea to put load on them without permission.

    [/ QUOTE ]

    Please respond to each of the above.

    Also, per your last...
    No, regular expressions are not supported in this context. You would drop the symbol from the left boundary. You would use ORD=All and then use a parser to strip the quote from the appropriate array element. (strtok, strstr, et al)

  6. #6
    SQA Knight
    Join Date
    Jan 2002
    Location
    Highlands Ranch, CO, USA
    Posts
    2,860
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Problem with web_reg_save_param

    Toolsmith,

    You need to go to the Mercury Knowledgebase on the support site and download the document on Correlation. In there you will see how to do all that you want to do. Also, as Jake has said use the ORD=ALL parameter on web_reg_save_param and then write code to parse/search for the specific value you want to use.

    This will help you finish off the tutorial that you are working on.
    Jim
    -------------------------------------------
    For all the general stuff to know about QA/Test go here http://www.softwareqatest.com/

 

 

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 08:06 PM.

Copyright BetaSoft Inc.