Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail From: Alex Lin Newsgroups: comp.lang.ruby Subject: Watir is unable to click Facebook "Login" button after button.click is executed Date: Fri, 6 May 2011 03:48:16 -0500 Organization: Service de news de lacave.net Lines: 34 Message-ID: <135e47df33fc9ccd27ad2145b40e66c2@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1304671749 73973 65.111.164.187 (6 May 2011 08:49:09 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Fri, 6 May 2011 08:49:09 +0000 (UTC) X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 382735 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <135e47df33fc9ccd27ad2145b40e66c2@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:4027 Hi, I tried to use Watir & ruby & IE9 to automate Facebook login but seems the "Login" button is protected by Facebook. Below is my code snip: ------------------------------------------------ ie = IE.new ie.goto('http://www.facebook.com/login.php') ie.text_field(:id, 'email').value = @user ie.text_field(:id, 'pass').value = @pass ie.button(:name, 'login').click puts '*** debug string here ***' ------------------------------------------------ When this code snip is executed, IE is opened and go to the login page, then the fields are filled. But the login button is not clicked. IE still displays the login page without being submitted. In the console, '*** debug string here ***' is printed directly. No error occurs. The same code in Google search page works fine. ------------------------------------------------ ie.text_field(:name, 'q').value = 'watir' ie.button(:name, 'btnG').click ------------------------------------------------ Does anyone encountered the same situation like me or anyone could give me any advice? Regards, Alex -- Posted via http://www.ruby-forum.com/.