Just as an aside, THIS line of code causes me concerns
b.button(:id => 'NEXT', :index =>2).click()
Per the HTML specification 'id' attribute values are supposed to be unique,
yet it would indicate you have at least three buttons on that page with the
very same ID (or two if you are using a much older watir that used one
based indexing)
One possible cause for your issue may be that the code on that page is
looking for some kind of event such as a change of focus, or 'onchange' in
the fields that causes it to do some client side validation and set
whatever flag it has for 'this field is populated' if you can view the
page source you might be able to tell, presuming it's defined in the HTML
On Thursday, May 31, 2012 1:41:31 PM UTC-7, JimJamie wrote:
>
>
>
> I don't think it is the code I'm using. I think it may be gems that
> are incompatible with my version of Ruby and or Win7 I'm using.
> My intention is to uninstall/reinstall to the version I have running
> on my XP laptop.
>
> require 'watir'
> require 'date'
> require "../properties/TemplateProperties"
>
> # Create a new browser
> b=Watir::Browser.new()
>
> # Go to the test site
> b.goto(properties.getUrl)
> b.text_field(:id, 'USERID').set(properties.getUsername)
> b.text_field(:id, 'PASSWORD').set(properties.getPassword)
> puts b.text_field(:id, 'USERID').value + (' has logged on.')
> sleep 5
> b.button(:id => 'NEXT', :index =>2).click()
>
>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]