Skip to content

Documentation for within should be updated #1117

Closed
@cddr

Description

The documentation states:-

"Execute the given block for a particular scope on the page. Within will find the first element matching the given selector and execute the block scoped to that element:"

However, if the selector returns more than one match, it seems to trigger an error rather than simply use the first matching element. According to the discussion here

https://groups.google.com/forum/#!searchin/ruby-capybara/ambiguous/ruby-capybara/z3Oh2jGR46U/zxZURjA-IjQJ

it looks like the observed behavior is the way it's supposed to work but in that case, I think the documentation is misleading.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions