Capybara uses selector css to find elements, we can do more than ".my-class" or "#my-id". XPath can be used to look for elements using different syntax, see above exemple.
# Check <a> element with data-confirm attribute value ends with "?"
has_css?('a[data-confirm$="?"]')
# Find and select option #3 inside given select (options
find('select.my-select', match: :first).find(:xpath, 'option[3]').select_option index start to 1)