History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-149
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ethan Jewett
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

include Enumerable in Watir::Table class

Created: 09/May/07 05:59 PM   Updated: 10/Jun/08 02:12 PM
Component/s: Table
Affects Version/s: 1.5.0/1.5.1, 1.5.3, 1.5.4, 1.6.0
Fix Version/s: 1.6.2

Original Estimate: 1h Remaining Estimate: 1h Time Spent: Unknown
File Attachments: 1. File include Enumerable in Table class against revision 1167.diff (0.3 kb)

Environment: All


 Description  « Hide
table(:index,1).each returns all the rows in the table with index of 1. However, Table doesn't mixin the Enumerable module, so you don't get functionality like each_with_index.

Adding the Enumerable mixin in watir.rb would add significant functionality to the Table object.

Drawbacks: As pointed out by Ian Webb, each_with_index is 0-indexed while Watir::Table.row(:index,1) is 1-indexed. This could be confusing. Maybe this improvement should only be included in Watir 1.6 and not Watir 1.5?

 All   Comments   Work Log   Change History      Sort Order:
Ethan Jewett - 09/May/07 06:04 PM
Patch against revision 1167. Includes Enumerable Watir::Table class.

Bret Pettichord - 16/May/07 12:56 PM
We will rework the table class in 1.6.