Forum: Ruby on Rails how to handle javascript with watir

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Lucas (Guest)
on 2009-05-19 19:50
(Received via mailing list)
html code:
<script language="javascript" type="text/javascript">
  document.write('<input name="TPL_password" id="TPL_password"
type="password" maxlength="20" size="32" tabindex="2"/>)
</script>

my question:

    how to locate the password field with watir?
Mk 2. (Guest)
on 2009-05-19 20:10
Lucas wrote:
> html code:
> <script language="javascript" type="text/javascript">
>   document.write('<input name="TPL_password" id="TPL_password"
> type="password" maxlength="20" size="32" tabindex="2"/>)
> </script>

Someone warned me yesterday that the language="javascript" part is
deprecated and should no longer be used. So I thot I'd pass that on.

But sorry, I've never used watir.  A shot in the dark would be to say
that 90% of this kind of thing involves the id=
Željko Filipin (Guest)
on 2009-05-20 14:58
(Received via mailing list)
This should work:

browser.text_field(:id, "TPL_password").set "not-the-real-one"

By the way, you will get more answers at
http://groups.google.com/group/watir-general/

Željko
This topic is locked and can not be replied to.