gem install rails --pre
rails new my_app -T
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #Navigating | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| #Clicking links and buttons | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| require 'nokogiri' | |
| require 'open-uri' | |
| # Get a Nokogiri::HTML:Document for the page we're interested in... | |
| doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
| # Do funky things with it using Nokogiri::XML::Node methods... | |
| #### |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
//scroll to the bottom of the page
((JavascriptExecutor) driver).executeScript("window.scrollTo(0, document.body.scrollHeight)");
Note: Do not upgrade Firefox browser version later than 40 - not compatible with latest Selenium Firefox Driver
Regex for a booking number: ^Ocean #BK+[0-9]{8}