Skip to content

Collection does not find items that are not direct children of the collection element #142

@dtognazzini

Description

@dtognazzini

For example, given:

<table>
<tr>
  <td class="first-name">Scooby</td>
</tr>
<tr>
  <td class="first-name">Raffy</td>
</tr>
</table>

And:

collection :rows, locator: 'table', item_locator: '.first-name'

page.rows.first.text should return "Scooby" but instead an error raised.

The error seems to be around this line:

Capybara::Selector.normalize(*evaled_locator).xpaths.first

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions