germsvel / phoenix_test

MIT License
144 stars 20 forks source link

Query associated element with `[id='<id>']` #99

Closed germsvel closed 1 month ago

germsvel commented 1 month ago

Resolves #97

What changed?

It turns out that Chrome and Firefox don't accept #text? as a valid selector. But having a ? in an element's id seems to be valid HTML.

Thank to https://github.com/philss/floki/issues/583 for the info.

To support that, we update our Query.find_by_label function to query by [id='<id>'] instead of using #<id>.