Skip to content

Geb .closest() method doesn't support CSS attribute selectors #437

Closed
@BillyRayPreachersSon

Description

@BillyRayPreachersSon

Given the following markup:

<div someAttr="foo">
    <div someAttr="bar">
        <h1>A title</h1>
    </div>
</div>

Given the following content, I would expect "fooEl" to find me the first div element :

title { $('h1') }
fooEl { title.closest('[someAttr="foo"]') }

However, it returns nothing. Changing the attribute selector into a map does work, so the element is definitely present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions