While location the select list element WATiR codes use "select-one" or "select-multiple" for matching the type of the select list. Also the "type" attribute of select list is "readonly" as per DOM specification:
http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-94282980
So if you are assigning value to "type" attribute browser should not take the value or rather should ignore the "type" . But if it is using that value for returning the type of the select list, then WATiR code will not be able to find the control because the value that you have given for type attribute i.e. "select" doesn't matches with "select-one" or "select-multiple". So thats why if first fails but after removing the type attribute it succeeds.
So I think its IE that is not behaving according to the DOM standards. WATiR code is working fine.
Hope that helps,
Regards,
Angrez
In our in house webpage we found that some of the select lists use a attribute TYPE="SELECT" when we tried to get a handle on these SELECT_LIST objects watir failed with the cannot find object error. We did some investigating and removed this attribute from the html, and watir then found the object with no problems. So my question is, is this a bug or a known issue and if so are there any workarounds or code updates that will resolve it? If you need more info please let me know.
Here's the HTML snippet with the offending attribute in red.
<tr>
<td class="label">
<DIV CLASS="required" pii="null" name="po_order_header.order_source.label" id="po_order_header.order_source.label" title="Order Source">Order Source</DIV></td><td class="field"><select pii="null" id="po_order_header.order_source" TYPE="SELECT" Name="po_order_header.order_source" tabindex="15" required="true"><OPTION VALUE="" title=""></OPTION><OPTION VALUE="AuthRep" title="">Authorized Representative</OPTION><OPTION VALUE="CapAnalyst" title="">Capacity Analyst</OPTION><OPTION VALUE="City" title="">City</OPTION><OPTION VALUE="Collection" title="">Collections</OPTION></select>
</td>
</tr>
Thanks,
Bill
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.
This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
_______________________________________________
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
