Hi Anthony, I tried the suggestion but there are some many panel on the package it's difficult to confirm the one I need to interact with.
I tried this to see how many tds exist on the page and it brought back 33. tds = br.div(:id,'main').tds I also tried to increment by one and get the text of the td and I get duplicate responses. cell = br.div(:id => "main").td(:index => 1).text Do you have any other ideas what I could do? Here is the html. You will see the tables don't have useful tags. <div id="main" style="padding: 10px"> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td align="left" style="vertical-align: top;"> <table cellspacing="5" cellpadding="0"> <tbody> <tr> <td align="left" style="vertical-align: top;"> <table class="gwt-DecoratorPanel" cellspacing="0" cellpadding="0"> </td> </tr> <tr> </tbody> </table> </td> <td align="left" style="vertical-align: top;"> <table cellspacing="5" cellpadding="0"> <tbody> <tr> <td align="left" style="vertical-align: top;"> <table class="gwt-DecoratorPanel" cellspacing="0" cellpadding="0" style="width: 355px;"> <tbody> <tr class="top"> <tr class="middle"> <td class="middleLeft"> <td class="middleCenter"> <div class="middleCenterInner"> Thanks again. And Any help would be great. Joe On Sunday, September 2, 2012 6:57:08 PM UTC-4, Anthony Hallett wrote: > > try cell = br.div(:id => "main").td(:index => 1) > > On Saturday, 1 September 2012 06:21:15 UTC+10, Joe Fl wrote: >> >> Hi Everyone, >> >> I am working on automating an GWT app for the first time. I am trying to >> get data from td tag in a >> specific table . >> >> When I run the following code: >> >> thr = br.div(:class,'middleCenterInner').trs >> >> I get the data from the first td. I need to get to the second. >> >> Here the code: >> >> <div id="main" style="padding: 10px"> >> <table cellspacing="0" cellpadding="0"> >> <tbody> >> <tr> >> <td align="left" style="vertical-align: top;"> >> <td align="left" style="vertical-align: top;"> ** I need to data from >> this one. >> </tr> >> </tbody> >> </table> >> </div> >> >> You can see there is nothing useful to use to get there. Most of the >> useful tags in the these >> tds are the same. >> >> I did try using the index and that didn't workout. >> My Code: >> thr = br.td(:index,1).div(:class,'middleCenterInner').trs >> >> Any help would be greatly appreciated. >> >> Thank you, >> Joe >> > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
