$ command line cheat sheets
Cheat Sheet Title: [ no_spaces_alphanumeric_only ]
Cheat Sheet:Capybara ======== Webrat alternative which aims to support all browser simulators. API === Navigating ---------- visit articles_path Clicking links and buttons -------------------------- click 'Link Text' click_button click_link Interacting with forms ---------------------- attach_file fill_in 'First Name', :with => 'John' check 'A checkbox' uncheck 'A checkbox' choose 'A radio button' select 'Peter Pan', :from => 'friends' unselect Querying -------- Takes a CSS selector (or XPath if you're into that). Translates nicely into RSpec matchers: page.should have_no_button("Save") Use should have_no_* versions with RSpec matchers b/c should_not doesn't wait for a timeout from the driver page.has_content? page.has_css? page.has_no_content? page.has_no_css? page.has_no_xpath? page.has_xpath? page.has_link? page.has_no_link? page.has_button?("Update") page.has_no_button? page.has_field? page.has_no_field? page.has_checked_field? page.has_unchecked_field? page.has_no_table? page.has_table? page.has_select? page.has_no_select? Finding ------- find find_button find_by_id find_field find_link locate Scoping ------- within within_fieldset within_table within_frame scope_to Scripting --------- execute_script evaluate_script Debugging --------- save_and_open_page Miscellaneous ------------- all body current_url drag field_labeled source wait_until current_path
Your cheat sheet will be editable (fixable) by anyone. Each cheat sheet is essentially a wiki page. It may also be used by millions of people for reference purposes from the comfort of their command line. If this is okay with you, please save.