Last active
January 26, 2017 02:23
-
-
Save kelby/1d2feb43c59816b5abea682ccacd74e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Key: | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
# Set repository: | |
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
# Install package: | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install chromium-chromedriver | |
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora | |
sudo apt-get update | |
sudo apt-get install firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install 'watir-webdriver' | |
gem install 'selenium-webdriver' | |
wget https://github.com/mozilla/geckodriver/releases/download/v0.13.0/geckodriver-v0.13.0-linux64.tar.gz | |
tar -xvzf geckodriver-v0.13.0-linux64.tar.gz | |
chmod +x geckodriver | |
cp geckodriver wires | |
sudo cp geckodriver /usr/local/bin | |
# export PATH=$PATH:/root/bin/wires | |
# export PATH=$PATH:/root/bin/geckodriver | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/11494994/is-it-possible-to-plug-a-javascript-engine-with-ruby-and-nokogiri | |
sudo apt-get install xvfb firefox | |
gem install watir-webdriver headless | |
require 'rubygems' | |
require 'watir-webdriver' | |
require 'headless' | |
headless = Headless.new | |
headless.start | |
browser = Watir::Browser.new | |
browser.goto 'http://jsbin.com/ivihur' # our example | |
el = browser.element :css => '#hello' | |
puts el.text | |
browser.close | |
headless.destroy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment