DSL Summary

An Overview of DSL Summary

DSL Summary

 

Let’s understand DSL Summary. Capybara comes with a very intuitive DSL which is used to express actions that will be executed. This is the list of basic command that are used:

  • First of all, visit(‘page_url’) # navigate to page
  • Secondly, click_link(‘id_of_link’) # click link by id
  • Thirdly, click_link(‘link_text’) # click link by link text
  • Subsequently, click_button(‘button_name’) # fill text field
  • After this, fill_in(‘First Name’, :with => ‘John’) # choose radio button
  • Further, choose(‘radio_button’) # choose radio button
  • Moreover, check(‘checkbox’) # check in checkbox
  • In addition, uncheck(‘checkbox’) # uncheck in checkbox
  • Furthermore, select(‘option’, :from=>’select_box’) # select from dropdown
  • Lastly, attach_file(‘image’, ‘path_to_image’) # upload file

Using the DSL, Capybara will search the following attributes in the DOM when trying to find an element:

  • First of all, Text field (fill_in): id, name, related label element
  • Subsequently, Click link/button (click_link/click_button): id, title, text within tag, value
  • Moreover, Checkbox/radio button/dropdown (check/uncheck/choose/select): id, name, related label element
  • Last but not least, Upload file (attach_file): id, name

Make your resume stand out and become a Certified Capybara Testing Professional. So, Try free practice tests here!

A great career is just a certification away. So, practice and validate your skills to become Certified Capybara Testing Professional

Advanced DSL
Exactness

Get industry recognized certification – Contact us

keyboard_arrow_up