Reputation: 4183
the following works:
find("#delete-category-link")
i want also to find 'delete-category-link-8' or 'delete-category-link-9'.
when i try with regex ^:
find('#^delete-category-link')
or
find('id^="delete-category-link"')
i get
Capybara::Webkit::InvalidResponseError:
SyntaxError: DOM Exception 12
What am I doing wrong?
Upvotes: 1
Views: 643
Reputation: 46836
The attribute selectors need to be enclosed by the [
and ]
. It should be:
find('[id^="delete-category-link"]')
Upvotes: 3