I agree, but this is just a simple example. in real life app it should have 
id or class or something else.... :)

Em quinta-feira, 15 de agosto de 2013 11h32min20s UTC-3, Oscar.Rieken 
escreveu:
>
> I personally would go and as the devs to put in some id's or I would go 
> add them myself. because I think that checking to make sure you see text by 
> locating the element by that same text doesnt make a whole lot of sense to 
> me. if it fails its going to throw an element not found
>
>
> On Thu, Aug 15, 2013 at 8:45 AM, watir webdriver 
> <[email protected]<javascript:>
> > wrote:
>
>> Thanks a lot Panato...
>>
>>
>> On Thu, Aug 15, 2013 at 1:25 PM, Tadeu Panato <[email protected]<javascript:>
>> > wrote:
>>
>>> 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] <javascript:>
>>> http://groups.google.com/group/watir-general
>>> [email protected] <javascript:>
>>>  
>>> --- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Watir General" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/watir-general/R21_TCY5aeg/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> [email protected] <javascript:>.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  -- 
>> -- 
>> Before posting, please read http://watir.com/support. In short: search 
>> before you ask, be nice.
>>  
>> [email protected] <javascript:>
>> http://groups.google.com/group/watir-general
>> [email protected] <javascript:>
>>  
>> --- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

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