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
DIV {
MARGIN:0px;}
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 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
_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr-------------------------------------------------------------------------
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