
| Key: |
WTR-149
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Ethan Jewett
|
| Votes: |
1
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
Watir
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
|
|
|
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?
|
|
Description
|
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? |
Show » |
|