Closed williamhub closed 6 years ago
button(:my_button, bookmark_button: 'custom-attribute-here')
should do the trick.
See page 122 'Located based on presence of attribute' on the Cucumbers and Cheese book.
Cheers.
You'll need to use the general #element accessor with the :tag_name
specified:
element(:bookmark, tag_name: 'bookmark-button', custom_attribute_here: 'attribute_value')
Thanks @jkotests @stevegibson
Do we have any methods to locate a non-standard element by its tag-name? For the above case, how can i locate the
bookmark-button
by its attribute in the html?I came across the documentation, but still failed to figure it out how to get this element.
Thanks a lot