Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript
  • It offers tester friendly DSL
  • Installation as simple as it is.
  • Capybara helps you test web applications by simulating how a real user would interact with your app
  • gem install capybara
  • gem install #{web_driver_on_which_capybara_runs}
  • Capybara : No wait & No sleep
  • Support xpath, css, jQuery.
  • Can use headless browsers without changing your code

Capybara - Web app Testing

  • Intuitive API
  • Easy to switch between drivers.

capybara's ease of use

Why Capybara

Manual => Automated

Capybara

  • Regression testing
  • Human error
  • Size of the application

Presented By

:Navigates to a particular path

  • visit

Capybara DSL

  • visit('/login')

Vinodini Visvanathan

  • click

:will click an anchor tag, button or input with type submit

  • click_button('Save')
  • click_link('id-of-link')
  • click('Link Text')
  • has_content?

:returns a boolean value reporting whether specific content is presentin the page

  • page.has_content?('Sign in')
  • Interacting with forms
  • fill_in

:fills in fields for you.

  • fill_in 'Title', with: 'I love Rails!'
  • fill_in('First Name', :with => 'vino')
  • check

:checks a checkbox

  • check('I accept')
  • uncheck

:unchecks a checkbox

  • uncheck('I accept')
  • select

:selects an option from a select tag

  • select 'MA', from: 'State'
  • jquery

:can execute jQuery scripts in your web page

  • page.evaluate_script("$('.firstname').text();")
  • e.g: firstname=page.evaluate_script("$('.firstname').text();")

expect(firstname).to eq("vino")

Date: June 23rd 2016

Learn more about creating dynamic, engaging presentations with Prezi