Skip to content

Select by text, select by label #8

@eahanson

Description

@eahanson

Maybe add some custom selectors:

<button id="foo-bar">Click Me Now</button>

#foo-bar:has-text("Click Me Now")
#foo-bar:has-text(~r/Click.*Now/)
<label for="foo-bar">
  <checkbox id="foo-bar" name="check-me"/>
  Check Me Now
</label>

checkbox:has-label("Check Me Now")
checkbox:has-label(~r/Check.*Now/)
Hq.find!("checkbox:has-label('Click Me')")
Hq.find!("has-label('Click Me')")
Hq.find!(has_label: "Click Me")
Hq.find!(has_label: ~r/Cli.*Me/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions