Skip to content

Select by text, select by label #8

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/)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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