/capybara-tutorial

Automated Integration Tests With Capybara In Ruby

#Capybara Tutorial

Automated Integration Tests With Capybara In Ruby

  • Why automated browser tests?
  • Brief description of Capybara
  • Non-Rails installation instructions

Jobs Board Application To Test PLUS additional pages/forms, if needed.

Part I : Locating Web Elements

  • Find element by ID
  • Find element by Name
  • Find element by Link Text
  • Find element by Partial Link Text
  • Find element by XPath
  • Find element by Tag Name
  • Find element by Class
  • Find element by CSS Selector
  • Chain find_elements to find child elements
  • Find multiple elements

Part II : Interacting With Hyperlinks

  • Click a link by text
  • Click a link by ID
  • Click a link by partial text
  • Click a link by XPath
  • Click Nth link with exact same lable
  • Verify a link is present or not?
  • Getting link data attributes
  • Test links open a new browser window

Part III: Clicking Buttons

  • Click a button by text
  • Click a form button by text
  • Submit a form
  • Click a button by ID
  • Click a button by Name
  • Click an image button **
  • Click a button via JavaScript
  • Assert a button is present
  • Assert a button enabled or disabled?

Part IV: Text field and Text area

  • Enter text into a text field by ID
  • Enter text into a password field
  • Clear a text field
  • Enter text into a multi-line text area
  • Assert value
  • Focus on a control
  • Set a value to a read-only or disable text field
  • Set and assert the value of a hidden field

Part V: Navigation and Browser

  • Go to a URL
  • Visit pages within a site
  • Perform actions from right mouse click context
  • Open browser in certain size
  • Maximize browser window
  • Minimize browser window
  • Switch between browser windows

Part VI: Assertions (OR Content Upgrade)

  • Assert page title
  • Assert page text
  • Assert page source
  • Assert label text
  • Assert span text
  • Assert DIV text or HTML
  • Assert table text
  • Assert text in a table cell
  • Assert text in a table row