Bug #3009
closedUnable to enter a numeric value into the text field.
Description
=begin
In my web page there is a text field "Age".
I would like to enter age into that field.
I written a code such that
ie.text_field(:name,'age').set(25)
It it throwing below error
undefined method `length' for 123:Fixnum (NoMethodError).
But It is not throwing an error if I written the code as below
ie.text_field(:name,'age').set('25')
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Third Party's Issue
- ruby -v changed from 1.8.6 to N/A
=begin
=end
Updated by hgs (Hugh Sasse) over 14 years ago
=begin
On Thu, 25 Mar 2010, shanth kumar wrote:
Bug #3009: Unable to enter a numeric value into the text field.
http://redmine.ruby-lang.org/issues/show/3009Author: shanth kumar
Status: Open, Priority: Normal
ruby -v: 1.8.6In my web page there is a text field "Age".
I would like to enter age into that field.
I written a code such that
ie.text_field(:name,'age').set(25)
This looks to me like you are using the watir library.
This is not about ruby itself.
It it throwing below error
undefined method `length' for 123:Fixnum (NoMethodError).But It is not throwing an error if I written the code as below
ie.text_field(:name,'age').set('25')
It is a text field. It expects text. Only the program receiving this input
can validate its input to be a number, and possibly only an integer.
If you must pass in a number, you can use .to_s to make it into a string.
Hope that helps
Hugh
=end
Updated by hgs (Hugh Sasse) over 14 years ago
=begin
On Thu, 25 Mar 2010, shanth kumar wrote:
Bug #3009: Unable to enter a numeric value into the text field.
http://redmine.ruby-lang.org/issues/show/3009Author: shanth kumar
Status: Open, Priority: Normal
ruby -v: 1.8.6In my web page there is a text field "Age".
I would like to enter age into that field.
I written a code such that
ie.text_field(:name,'age').set(25)
This looks to me like you are using the watir library.
This is not about ruby itself.
It it throwing below error
undefined method `length' for 123:Fixnum (NoMethodError).But It is not throwing an error if I written the code as below
ie.text_field(:name,'age').set('25')
It is a text field. It expects text. Only the program receiving this input
can validate its input to be a number, and possibly only an integer.
If you must pass in a number, you can use .to_s to make it into a string.
Hope that helps
Hugh
=end