just simple print the word best or anything in the cell? man its simple, 
you aleredy use that

example
<body>
<table>
  <tr>
    <td>blabla 1</td>
    <td>xoxoxo 2</td>
  </tr>
  <tr>
    <td>blblablalba 3</td>
    <td>yommamma 4</td>
  </tr>
</table>
</body>

irb:

table = b.table
#you can use searching the :text but i prefer use the index
puts t.td(:text => "blabla 1").text #should print "blabla 1"

puts t.td(:index => 3).text #should print "yommamma 4"



Em quarta-feira, 14 de agosto de 2013 11h56min22s UTC-3, watir webdriver 
escreveu:
>
> Is there any way how to print the text from the table?
> I've managed to verify if the text is present on the page or not but not 
> sure how to print the text.Its a table with 20 rows.
>
>
> *Then(/^I should see "(.*?)" on the page$/) do |expected_result|
> puts (@browser.text.include? expected_result).should == true
> puts @browser.td(:text => expected_result)  ###Here I want to print the 
> expected_result which is nothing but best
> end*
>
> *Sample HTML :*
> <tr>
> <th>Generation</th>
> <td>*best*</td>
> </tr>
>
> Any suggestions ?
> Thanks in-advance...
>

-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to