Dear All,
I use a framework that generates all the form included
input types of any kind.... it gives to all form
elements proprietary names that I cannot discover at
runtime.
So is very difficult to use jwebunit to test this kind
of forms.
But I can use the id attribute for every form element,
button, submit... so now I'm asking you if I can access
(set, get the form values) using the ID...
Now I have a code snipped like this:
private String getNameByID(String ID,WebResponse resp)
{
String result=null;
HTMLElement testo;
try {
testo=resp.getElementWithID("firstname");
result=testo.getName();
}
catch (Exception e)
{
System.out.println("exception...to debug...");
}
return result; \}
I pass tho this method the "ID" and the httpunid
webresponse object to get the "name" of a form element...
I don't think this is an "optimal" solution....
Could you extend jwebunit to get this feature available?
Many thanks
Ivan
Logged In: YES
user_id=619947
Is this tapestry?
If so, it seems like I remember someone posting or telling
me about a way around that problem (fixing form element
names to specific values).
Logged In: YES
user_id=442311
I use dbforms, yet another mvc framework.
I have to access to elements by id because this frameworks
writes form.elements with its own names.
thanks
ivan
This artifact has been marked as a duplicate of artifact 1653557 with reason:
JWebUnit now has getElementById(id) method.\