Re: form button.click() problem with javascript
"Karl Blum" <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <69FE5255C0279840BF8AACEC0B231647016308F6@EXGBGMB02.europe.cellnetwork.com> |
I tried disabling javascript before click() method. But the result is
the same.
I have a script that presumably should work, but this is written in
python on top of java and I am not able to test it.
This exception handling does not make sense to me, but could it be the
solution?!
def press(form,btn_number):
pressed=0
try:
try:
form.getButtons()[btn_number].click()
pressed=1
except java.lang.RuntimeException:
print '504 caught'
if not pressed:
press(form,btn_number)
pressed=1
except org.mozilla.javascript.JavaScriptException:
print " JS exception"
if not pressed:
press(form,btn_number)
pressed=1
except com.meterware.httpunit.HttpException:
print "general exception"
if not pressed:
press(form,btn_number)
pressed=1
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of
david jeanneteau
Sent: 4. juuni 2007. a. 12:19
To: Discussion of use and development of HttpUnit
Subject: Re: [Httpunit-develop] form button.click() problem with
javascript
Hi,
Javascript support is not complete.
You can try with javascript disabled ?
Regards,
David
On 6/4/07, Karl Blum < [email protected]
<mailto:[email protected]> > wrote:
I have a form with a submit button (javascript submit action) and when
clicking on the button, it does not submit the form.
WebForm form = resp.getFormWithName("vorm");
form.setParameter("a", 1);
form.setParameter("b", 2);
form.getButtons()[0].click(); //only one button in the form, so
this is correct
resp = session.getCurrentPage(); // resp stays the same after
click.
Could this be a problem operating with javascript with httpunit. I have
known errors in this site's javascript, although this does not interfere
the submit button action.
Karl
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop