Capybara

driven_by

  • :rack_test
  • :selenium_chrome_headless
visit url
click_on identifier
fill_in identifier, with: string

find('.myselector', match: first)

expect(page).to have_content(string)
expect(page).to have_selector('article.myclass')
expect(page).to have_selector('article.myclass', text: 'content')
expect(page).to have_selector('article.myclass', count: 2)
expect(element[:class]).to include('some-class')