
| Key: |
WTR-226
|
| Type: |
Bug
|
| Status: |
Open
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Hugh
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
Watir
Created: 01/Jul/08 06:20 PM
Updated: 01/Jul/08 06:20 PM
|
|
| Component/s: |
HTML Controls
|
| Affects Version/s: |
1.5.6
|
| Fix Version/s: |
None
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Environment:
|
Watir 1.5.6 ( I also see it on 1.5.2), WinXP
|
|
|
If there's a table embedded in table, you get a WIN32OLERuntime error when iterating over the outer table with each(). If you iterate on the inner table it works properly. I've included some sample html and an IRB session snippet
Outer Table
irb(main):010:0> ie.tables[1].each { |t| puts t.class}
Watir::TableRow
Watir::TableRow
WIN32OLERuntimeError: unknown property or method `2'
HRESULT error code:0x80020006
Unknown name.
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:154:in
`[]'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:154:in
`_row'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:91:in `
each'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:90:in `
upto'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:90:in `
each'
from (irb):10
Inner Table
irb(main):011:0> ie.tables[2].each { |t| puts t.class}
Watir::TableRow
=> 1
<html><title>Embedded Table Test</title><body>
<table border>
<tr><td>Outer table</td></tr>
<tr><td><table border><tr><td>Inner Table</td></tr></table></td></tr>
</table>
</body></html>
|
|
Description
|
If there's a table embedded in table, you get a WIN32OLERuntime error when iterating over the outer table with each(). If you iterate on the inner table it works properly. I've included some sample html and an IRB session snippet
Outer Table
irb(main):010:0> ie.tables[1].each { |t| puts t.class}
Watir::TableRow
Watir::TableRow
WIN32OLERuntimeError: unknown property or method `2'
HRESULT error code:0x80020006
Unknown name.
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:154:in
`[]'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:154:in
`_row'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:91:in `
each'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:90:in `
upto'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/./watir/table.rb:90:in `
each'
from (irb):10
Inner Table
irb(main):011:0> ie.tables[2].each { |t| puts t.class}
Watir::TableRow
=> 1
<html><title>Embedded Table Test</title><body>
<table border>
<tr><td>Outer table</td></tr>
<tr><td><table border><tr><td>Inner Table</td></tr></table></td></tr>
</table>
</body></html> |
Show » |
| There are no comments yet on this issue.
|
|