httpunit and javascript???

Posted on 2005-04-26
Last Modified: 2012-08-13
Hi! Im developing a web application and use httpunit to http test it.

Here's the scenario, i had a page that has a form(html form) and a couple of text,button and hidden fields.When the form is submitted there's a javascript function that is called

<form onSubmit="javascript:validate();">.In the javascript function, some validation  and use the javascript function parseInt. parseInt function in javascript, as we all know, well just convert the given string to a number(whole number).

Well, i tried to run my apps in browser and the parseInt is returning a whole number.But when i tried to run httpunit, parseInt returns a decimal number.

IE - 6

what do you think guys? Is this has something to do with the javascript version used by httpunit?
Question by:rdy1437
    LVL 15

    Accepted Solution

    Probably, If you read you can see that their JavaScript support is pretty limited
    and parseInt is not among the supported methods.
    Though what surprised me is that httpunit delegates the javascript calls to rhino which actually applies the parseInt correctly, so that leave
    me to belive that httpunit wraps it with the wrong type (like Double instead of Integer).

    Author Comment

    Thanks for the reply you know or have used other http test aside from httpunit thats support javascript?
    LVL 15

    Expert Comment

    No, I used for that purpose only httpunit and I didn't use much the JavaScript validation feature (I used rhino directly to test my scripts).

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now