SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5

Thread: HTTPUNIT

  1. #1
    Junior Member
    Join Date
    Jul 2005
    Location
    Hyderabad
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    HTTPUNIT

    Hi All,

    I am working on HTTPUNIT,I have one problem with Links.

    With Every Link,some parameter is passing with the target URL like "ACTION_MODE=ADD". Like this type of links i am unable to click the link. Remaining type of links with out any Parameters, I can click the links by writing code.

    Can any body tell the solution

    bye,
    Anilraja.

  2. #2
    Member
    Join Date
    Jul 2002
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: HTTPUNIT

    Please explain what you mean by "unable to click the link". What happens? Do you get a error page returned for example? What happens if you navigate to that url in a browser, does it return a valid page or an error page?
    Jill

    http://www.ozibug.com - quality web based bug tracking

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

    Re: HTTPUNIT

    Thank you jill,

    I had written the code to click the link and go to next page like:

    ------------------------
    WebLink httpLink = jdoc.getFirstMatchingLink( WebLink.MATCH_CONTAINED_TEXT, "Add New Customer" );
    response = httpLink.click();

    "jdoc" is nothing but the current page
    (WebResponse jdoc=conversation.getCurrentPage() [img]images/icons/wink.gif[/img]
    -----------------------
    The target URL is: "....../admin/customer/prepAddCustomerAuto.do?ACTION_MODE=ADD"..... I wrote code for clicking the link as above; But i am getting some code displayed in executing the line "response = httpLink.click();"

    I think with the target URL, we are sending some parameter like "ACTION_MODE=ADD",is there any other procedure to click the link where the target URL contains parameters.

    I checked the other links to click, where there are no parameters with the target URL....In that case the code is working for "click()".

    =============
    Regards,
    Anil Raja.

  4. #4
    Member
    Join Date
    Jul 2002
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: HTTPUNIT

    You should be able to call click for a link where the url contains parameters, I have tests that do this.

    Try confirming that the link contains the url you expect by printing out httpLink.getURLString() before calling click().

    If you explain exactly what happens when you call click() it would help. Is it an exception or an unexpected response or something else? Include the results of what you are seeing ...
    Jill

    http://www.ozibug.com - quality web based bug tracking

  5. #5
    Junior Member
    Join Date
    Jul 2005
    Location
    Hyderabad
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: HTTPUNIT

    ==================
    WebLink httpLink = jdoc.getFirstMatchingLink( WebLink.MATCH_CONTAINED_TEXT, "Add New Customer" );
    response = httpLink.click();
    ===================
    When i am using the above code to "click()" a link i am getting a Error as below:

    -----------------------------------Error-----
    [java] failed: org.mozilla.javascript.EvaluatorException: The undefined
    value has no properties. (httpunit; line 40)
    ------------------------------------
    The Error "The undefined value has no properties." means what???.

 

 

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 03:36 AM.

Copyright BetaSoft Inc.