I was afraid of that.
A response from the HTMLUnit site was as follows:
1- forum.submit(null); 2- Or, form.submit((SubmittableElement) null);
(depending of HtmlUnit 1.14 or
SVN version).
I was not sure how to do this since we do not use HTMLUnit directly. Any advice
on that?
_____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien HENRY
Sent: Thursday, March 06, 2008 4:01 PM
To: Usage problems for JWebUnit
Subject: [JWebUnit-users] Re : Re : JWebTest & HTMLUnit - Submit
Formelementoutsideof Form
The problem is not to find the button. The problem is to know which form to
submit when you click the button.
I suppose real browsers "attach" the lonely button to the previous form. But
HtmlUnit seems to be not capable of doing this.
I don't think an easy way exists with JWebUnit.
++
Julien
----- Message d'origine ----
De : "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Jeudi, 6 Mars 2008, 16h14mn 17s
Objet : Re: [JWebUnit-users] Re : JWebTest & HTMLUnit - Submit Form
elementoutsideof Form
Yes, submitted the same question there.
I believe there was a way with HTTPUnit to accomplish this using
updateFormParameter():
http://kickjava.com/src/net/sourceforge/jwebunit/HttpUnitDialog.java.htm
The browser does see the Form (Ie Developer Toolbar DOM layout), but the
buttons are not in it.
I wonder if there is a way, as a temporary workaround, to get the coordinates
of the buttons somehow using the attribs, then click by coondinate?
_____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien HENRY
Sent: Thursday, March 06, 2008 6:05 AM
To: Usage problems for JWebUnit
Subject: [JWebUnit-users] Re : JWebTest & HTMLUnit - Submit Form
elementoutsideof Form
Hi,
Did you ask HtmlUnit team about this problem? I'm a bit surprised it doesn't
work because HtmlUnit is supposed to handle real HTML (I mean HTML not always
well-formed).
Here the problem is how your web browser can know what form should be submitted
when you click on the submit button?
Regards,
Julien
----- Message d'origine ----
De : "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Mercredi, 5 Mars 2008, 20h33mn 04s
Objet : [JWebUnit-users] JWebTest & HTMLUnit - Submit Form element outsideof
Form
Is there a way to fake out HTMLUnit into clicking on a submit button that is
erroneously outside of the form due to poor HTML structuring? It seems every
call to doClickAction() first looks for the form in the DOM, then calls
form.submit(this).
What is happening is the form is there, the button is in _namelist object, all
attributes set, and everything seemingly works as it should (no Form
exceptions), but the submit is never actually performed.
While the developers have admitted the submit button is not enclosed within the
form properly, I am wondering if I can get around this until they fix it?
The call we use in JWebTest is:
HTTPTester.clickElementByXPath("//[EMAIL PROTECTED]"" + parameterName +"\"]");
Thanks!
-----La pièce jointe correspondante suit-----
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----La pièce jointe correspondante suit-----
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
_____
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails
<http://fr.rd.yahoo.com/mail/mail_taglines/trueswitch/SIG=11gshn0bu/**http%3A%2F%2Fwww.trueswitch.com%2Fyahoo-fr%2F>
vers Yahoo! Mail
-----La pièce jointe correspondante suit-----
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----La pièce jointe correspondante suit-----
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
<hr size="1"> Envoyé avec <a
href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo!
Mail</a>.<br>Une boite mail plus intelligente. </a>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users