Skip to content

Instantly share code, notes, and snippets.

@christophervigliotti
Last active April 20, 2018 13:52
Show Gist options
  • Select an option

  • Save christophervigliotti/9df6c989cc09f378d3d1c25ea1270fcd to your computer and use it in GitHub Desktop.

Select an option

Save christophervigliotti/9df6c989cc09f378d3d1c25ea1270fcd to your computer and use it in GitHub Desktop.
AFT Expectations Reference
# does button exist and is enabled
expect(page).to have_button('Update')
# does button exist and is disabled
expect(page).to have_button('Update', disabled: true)
# does h1 contain both of the specified strings
expect(page).to have_selector(:xpath, "//h1[contains(text(), 'New') and contains(text(), 'Person')]")
# does an input field with id of dataFirstName.1 exist
expect(page).to have_selector(:xpath, "//input[@id='name']")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment