Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- #coding:utf-8
- #Download selenium driver from https://code.google.com/p/chromedriver/downloads/list
- require 'selenium-webdriver'
- Selenium::WebDriver::Chrome.path = '/usr/bin/chromium' #Chrome path. You might want to set Iron instead?
- userdir = '/home/USER/Desktop/selenium'
- driver = Selenium::WebDriver.for :chrome ,:switches => %W[--enable-easy-off-store-extension-install --allow-running-insecure-content --user-data-dir=#{userdir}]
- exit if ARGV[0]=='setup' #Chrome window doesn't close. Install cTouch and login to mbga/gree.
- #start macro.
- 3.times{|i|
- driver.navigate.to 'http://gree.jp/'
- sleep 2
- }
- driver.quit #close Chrome window.
Advertisement
Add Comment
Please, Sign In to add comment