Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Capybara - Web app testing

No description
by

vino visvam

on 29 June 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Capybara - Web app testing

Capybara DSL
Capybara - Web app Testing
Presented By

capybara's ease of use
Manual => Automated
Why Capybara
Vinodini Visvanathan

Date: June 23rd 2016

Capybara
Capybara helps you test web applications by simulating how a real user would interact with your app
Capybara : No wait & No sleep
Can use headless browsers without changing your code
Intuitive API
It offers tester friendly DSL
Installation as simple as it is.
gem install capybara
gem install #{web_driver_on_which_capybara_runs}
Support xpath, css, jQuery.
Regression testing
Human error
Easy to switch between drivers.
Size of the application
visit
:Navigates to a particular path
visit('/login')
click
:will click an anchor tag, button or input with type submit
click_button('Save')
click_link('id-of-link')
click('Link Text')
Interacting with forms
fill_in
:fills in fields for you.
fill_in 'Title', with: 'I love Rails!'
fill_in('First Name', :with => 'vino')
has_content?
:returns a boolean value reporting whether specific content is presentin the page
page.has_content?('Sign in')
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")
Full transcript