Skip to content

Instantly share code, notes, and snippets.

View PritiKumr's full-sized avatar

Preethi Krishnamoorthy Ramesh Kumar PritiKumr

View GitHub Profile
@PritiKumr
PritiKumr / install.sh
Created May 11, 2017 11:35 — forked from ziadoz/install.sh
Install ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Remove existing downloads and binaries so we can start from scratch.
rm ~/google-chrome-stable_current_amd64.deb
@PritiKumr
PritiKumr / capybara cheat sheet
Created May 11, 2017 11:48 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=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')
$(function() {
function split( val ) {
return val.split( /,\s*/ );
}
function extractLast( term ) {
return split( term ).pop();
}
$( "#new_interest" ).autocomplete({
class Controller
include LazyLoad
def show
@model = Model.find(...)
respond_to do |format|
format.html do
@html_specific_data = Model.find(...)
end