Hi,

I have table, inside it i have table row, which interm have data
[text] as Summary and Detail.

Source code from IE is :


<TABLE class=grid-btable cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY id=z_f2_rh>
<TR class="grid " id=z_f2_sh style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Grw" z.rid="z_f2_4g"
z.inited="true">
<TD class=gc id=z_f2_th!chdextr style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Gcl">
<DIV class="gc cell-inner " id=z_f2_th!cell><SPAN id=z_f2_th
style="WIDTH: 115px">Name:</SPAN></DIV></TD>
<TD class=gc id=z_f2_vh!chdextr style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Gcl">
<DIV class="gc cell-inner " id=z_f2_vh!cell><INPUT class=text
id=z_f2_vh style="WIDTH: 450px" maxLength=100
z.type="zul.widget.Txbox"></DIV></TD>
<TD class=gc id=z_f2_uh!chdextr style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Gcl">
<DIV class="gc cell-inner " id=z_f2_uh!cell><SPAN id=z_f2_uh
style="WIDTH: 115px">(Limit 100 characters)</SPAN></DIV></TD></TR>
<TR class="grid odd" id=z_f2_0i style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Grw" z.rid="z_f2_4g"
z.inited="true">
<TD class=gc id=z_f2_1i!chdextr style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Gcl">
<DIV class="gc cell-inner " id=z_f2_1i!cell><SPAN id=z_f2_1i
style="WIDTH: 115px">Type:</SPAN></DIV></TD>
<TD class=gc id=z_f2_4i!chdextr style="BORDER-RIGHT: white 0px solid;
BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px
solid; BORDER-BOTTOM: white 0px solid" z.type="Gcl">
<DIV class="gc cell-inner " id=z_f2_4i!cell><SPAN class=combobox
id=z_f2_4i z.type="zul.cb.Cmbox" z.combo="true"><INPUT
class="comboboxinp readonly" id=z_f2_4i!real readOnly value=Summary
autocomplete="off"><SPAN class=rbtnbk id=z_f2_4i!btn style="PADDING-
BOTTOM: 2px; PADDING-TOP: 3px; POSITION: relative; TOP: 1px"><IMG
src="https://vm-bhaveshok2.kazeon.local/reports/zkau/web/zul/img/
combobtn.gif"></SPAN>
<DIV class=comboboxpp id=z_f2_4i!pp style="DISPLAY: none" tabIndex=-1>

<TABLE id=z_f2_4i!cave cellSpacing=0 cellPadding=0>
<TBODY>
<TR class=item id=z_f2_2i z.type="Cmit" z.disd="false">
<TD></TD>
<TD>Summary</TD></TR>
<TR class=item id=z_f2_3i z.type="Cmit" z.disd="false">
<TD></TD>
<TD>Detail</TD></TR></TBODY></TABLE></DIV></SPAN></DIV></TD></TR>


Im looking at last 8 lines.

There is no name, class for this table.  only there is dynamic id
generated.

I want to select text "Detail: out of this combobox.

Can someone help how can i do it.

Im using watir webdriver.

I tried like :

$ie.table(:class, "grid-btable").cell(:class => "item", :text =>
reportType).click

$ie.input(:value, "Summary").select(reportType)

$ie.input(:value, "Summary").select(reportType)

$ie.table(:class, "grid-btable").div(:class, "comboboxpp").tr(:class,
"item").td(:text, "Detail").click

 $ie.table(:class, "grid-btable").div(:class, "comboboxpp").td(:text,
'Detail').click

$ie.div(:class, "comboboxpp").tr(:class, "item").td(:text,
"Detail").click

But all failed with some or other error like not able to find element
etc.

Bhavesh

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to