page-object gem elements count mismatch

56 views Asked by At

Count returns 1 instead of actual number.

HTML

<table id='list'>
    <tbody>
        <tr><td></td></tr>
        <tr><td></td></tr>
        <tr><td></td></tr>
        <tr><td></td></tr>
        <tr><td></td></tr>
        <tr><td></td></tr>
    </tbody>
</table>

PAGE_CLASS

rows(:all_rows, css: '#list tbody tr')

STEP

puts @current_page.all_rows_elements.count
=> 1

Have no idea :(

1

There are 1 answers

0
codesman On BEST ANSWER

Wait helped to resolve this issue. Even Sleep 1 fixes this issue.