From: brabuhr@... Date: 2011-11-27T12:41:58+09:00 Subject: Re: check email accounts with a ruby script On Sat, Nov 26, 2011 at 10:02 PM, Michael Cuggy wrote: > I've seen a Ruby script that could check web-based email accounts (e.g., > gmail, yahoo, hotmail, etc.) by opening a web browser. I'm not sure what > triggers the yahoo captcha challenge.  However, I'd like to know if > there was free Ruby code for a script to check email accounts.  In the > script you hardcode the username and password.  I don't have much > experience with Ruby. Years ago I used FireWatir to drive Firefox to hit GMail; Watir Webdriver looks to be the modern equivalent: http://watirwebdriver.com/ require 'watir-webdriver' b = Watir::Browser.new b.goto 'bit.ly/watir-webdriver-demo' b.text_field(:id => 'entry_0').set 'your name' b.select_list(:id => 'entry_1').select 'Ruby' b.select_list(:id => 'entry_1').selected? 'Ruby' b.button(:value => 'Submit').click b.text.include? 'Thank you' http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/374100 Captchas would be a problem though :-) A more reliable approach may be to use another protocol or API for the service (e.g. REST, Atom/RSS, IMAP).