I'm sorry to say your developer is not correct. If an ID is not
explicitly specified, the framework will create one, and it would be
subject to change if the control tree changed on postback. However, if
an ID *is* explicitly specified, the framework will use that ID.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Zeljko Filipin
Sent: Thursday, July 21, 2005 7:34 AM
To: [email protected]
Subject: [Wtr-general] id

>From watir.rb:

#  The ways that are available to identify an html object depend upon
the object type, but include
#   :id           used for an object that has an ID attribute -- this is
the
best way!

I talked to developer and he told me that our web applications are
developed in asp.net and that he can not assign id property to html
object, and that asp.net does it.
Id is assigned to element by it's position at page, something like

<input id="catalog_1" type="checkbox" />

and id is changed when another element (checkbox in this case) is added
to page.

Example: add another checkbox to page, so it is above (before) this one.
New checkbox gets id="catalog_1", and old one is changed to
id="catalog_2".

It is just like using :index, and "i always consider using :index to be
an ugly hack when nothing else will work." (Bret Pettichord)

Has anybody else this problem (and solution)?

Zeljko

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to