I think the problem is that "size" and "maxLength" are not defined for
textarea.

Zeljko

-----Original Message-----
From: Zeljko Filipin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 26, 2005 4:32 PM
To: wtr-general@rubyforge.org
Subject: bug in text_field.to_s

There seems to be a bug in text_field.to_s:

-----
HTML (valid):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">
<head>
<title>
textarea
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<p>
<textarea rows="2" cols="10">
</textarea>
</p>
</body>
</html>
-----
IRB:

irb
require 'watir'
ie = Watir::IE.attach(:title, //)
ie.textField(:index, 1).to_s
-----
OUTPUT:

WIN32OLERuntimeError: Unknown property or method `size'
    HRESULT error code:0x80020006
      Unknown name.
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in
`method_missing'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in `size'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3480:in
`text_string_creator'
        from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3490:in `to_s'
        from (irb):3
        from :0
-----
It works just fine if instead of

<textarea rows="2" cols="10">
</textarea>

there is

<input type="text" />

or

<input type="password" />.

Zeljko

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to