[Wtr-general] accessing the asp.net TabStrip from Watir
Vincent Predoehl
vpredoehl at phoenixwebgroup.com
Mon Sep 25 21:11:27 EDT 2006
My previous post was wrong about the nested tables. IE implements
the .NET TabStrip as an IE control so I could never find my tabstrip
by looking for a table, which is what FireFox was telling me it was.
So how can I access the .NET tabstrip in IE from Watir? Here's a
snippet from my page source:
<?XML:NAMESPACE PREFIX="TSNS" /><?IMPORT NAMESPACE="TSNS"
IMPLEMENTATION="/webctrl_client/1_0/tabstrip.htc" />
<TSNS:TabStrip id="mysubtabs" name="mysubtabs" selectedIndex="0"
tabDefaultStyle="text-align:center;color:#ffffff;width:
120;background:#333367;" tabHoverStyle="text-
align:center;color:#000000;width:120;background:#D3D3D3;"
tabSelectedStyle="text-align:center;font-
weight:bold;color:#000000;width:120;background:#D3D3D3;"
onSelectedIndexChange="JScript:document.myform.__mysubtabs_State__.value
=event.index;if (getAttribute('_submitting') != 'true'){setAttribute
('_submitting','true');try{__doPostBack('mysubtabs','');}catch(e)
{setAttribute('_submitting','false');}}" onwcready="JScript:try
{document.myform.__mysubtabs_State__.value=selectedIndex}catch(e){}"
style="font-size:9pt;height:25px;">
<TSNS:Tab>Agricultural</TSNS:Tab>
<TSNS:Tab>Livestock</TSNS:Tab>
<TSNS:Tab>Crude</TSNS:Tab>
<TSNS:Tab>FX</TSNS:Tab>
<TSNS:Tab>Interest Rates</TSNS:Tab>
<TSNS:Tab>NGL's</TSNS:Tab>
<TSNS:Tab>Natural Gas</TSNS:Tab>
<TSNS:Tab>Refined</TSNS:Tab>
</TSNS:TabStrip>
</td>
--
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060925/1c8f8b01/attachment.html
More information about the Wtr-general
mailing list