Hi,

Normally, we should have unique id in the page. I think we should first search for an element with the given id in the whole page, and if there is no match, find the first element with the given name.

I think located elements thanks to there id should be the prefered way.

++

Julien

----- Message d'origine ----
De : Fred <[EMAIL PROTECTED]>
À : [email protected]; Julien HENRY <[EMAIL PROTECTED]>
Envoyé le : Vendredi, 28 Juillet 2006, 3h26mn 17s
Objet : Priorities when searching html element by id or name


Hi all,

I have some questions about the current implementation of HtmlUnitDialog.
This mail will only concern the priorites when searching html element by id or
by name.

Does the priorities must be defined at page level or element level ?

Priorities at page level would mean that the first html element with id equals
to nameOrId is returned. If not, the first html element with name equals to
nameOrId is returned.

Priorities at element level would mean that the first html element whose id or
name is equal to nameOrId is returned.

These will give different result if we have for exemple:

<form id="form_2" name="my_form"></form>

<form id="my_form" name="a form"></form>

If priorities are defined at page level, getting the form whose id or name is
equals to my_form should return the second one.

If priorities are defined at element level, getting the form whose id or name
is equals to my_form will return the first one.

My case is probably too much specific but I would like to be sure we have the
same point of view :o)

Other topics will follow :o)

Regards,

Fred.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to