From: Phil Mcdonnell Date: 2010-05-26T15:24:30+09:00 Subject: Watir - finding element in form I'm trying to use Watir to log into a page. I can't seem to find the login button in order to click on it. From the Watir examples I've read it seems I need the following code: browser = Watir::Safari.new browser.goto @login_page browser.text_field(:name, 'UserID').set(ARGV[0]) browser.text_field(:name, 'Password').set(ARGV[1]) browser.button(:alt, 'Login').click However, the final line doesn't do anything. Note, the text_field lines do correctly set the username and password. Any idea how to fix this? Here's the relavent html:
... lots of stuff ... ... lots of stuff ...
Also, the full site is here: https://online.americanexpress.com/myca/logon/us/action?request_type=LogonHandler&Face=en_US&DestPage=https://www99.americanexpress.com/myca/acctsumm/us/action%3Frequest_type%3Dauthreg_acctAccountSummary%26us_nu%3Dlogincontrol&Info=CUExpired -- Posted via http://www.ruby-forum.com/.