I use the following line to locate the cell: $ie.div(:id, 'dbGrid').div(:class, 'dojoxGrid-master-header').table (:class, 'dojoxGrid-row-table').th(:text, 'stat_name').click
I get the following error on console: 1) Error: test_Statistics(TC_UI): NoMethodError: undefined method `th' for #<Watir::Table:0x3726a5c> C:/ruby/test/Ian.rb:165:in `test_Statistics' 1 tests, 0 assertions, 0 failures, 1 errors On Dec 17, 4:13 pm, "Nathan Lane" <nathamberl...@gmail.com> wrote: > Have you tried th.click ? It is a standard tag, so it doesn't seem logical > that <th> wouldn't be supported by Watir, but I could be wrong. > > > > On Wed, Dec 17, 2008 at 1:11 PM, maven999 <maven...@gmail.com> wrote: > > > Hi, > > > I have a dojo grid that I want to sort by column. The grid has 2 > > header cells named stat_name and stat_value. The header cell by > > default does not have a 'sort' arrow that I can click. The sort button > > becomes visible when I click on the header cell the first time, after > > which I can sort up or down. The html source for the header cell (with > > text 'stat_name' or 'stat_value') is: > > > <DIV class="dojoxGrid" id="dbGrid" > > <DIV class="dojoxGrid-master-header" > > <DIV class="dojoxGrid-header" > > <TABLE class="dojoxGrid-row-table" > > <TBODY _zipIdx="22" unselectable="on"> > > > <TH class="dojoxGrid-cell" style="WIDTH: 11.89em" > > _zipIdx="22" role="wairole:columnheader" unselectable="on" > > idx="0">stat_name</TD _zipIdx="22" unselectable="on"><//TD> > > > </TH> > > > <TH class="dojoxGrid-cell " style="WIDTH: 16.79em" > > _zipIdx="22" role="wairole:columnheader" unselectable="on" > > idx="1">stat_value</TD _zipIdx="22" unselectable="on"><//TD></TR > > _zipIdx="22" unselectable="on"><//TR> > > > </TH> > > </TBODY> > > </TABLE> > > </DIV> > > </DIV> > > </DIV> > > </DIV> > > > As far as I know, Watir does not support a TH tag. Any idea on how I > > can locate this header cell and click it? > > > Thanks! > > -- > Nathan Lane > Home,http://www.nathandelane.com > Blog,http://nathandelane.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---