• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 361
  • Last Modified:

httpunit and javascript???

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
HTTPUNIT - 6.0

what do you think guys? Is this has something to do with the javascript version used by httpunit?
0
rdy1437
Asked:
rdy1437
  • 2
1 Solution
 
aozarovCommented:
Probably, If you read http://www.httpunit.org/doc/javascript-support.html 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).
0
 
rdy1437Author Commented:
Thanks for the reply aozarov.do you know or have used other http test aside from httpunit thats support javascript?
0
 
aozarovCommented:
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).
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now