[wtr-general] Re: Unable to enter integer value in a text_field

2009-02-03 Thread John Kolokotronis

Since you want everything as a string (both numbers and strings), why
bother
with the to_i conversion to get rid of the decimals? I'd just do this:

x=w.application.cells(row_count,col_count)['value']
x.to_s.gsub(/\.\d+/, ) # This will remove anything like .00, .
12345, etc...

and leave you with a string to use in your text field. It won't touch
the string
matches, like arc or get.

Regards,

John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to enter integer value in a text_field

2009-02-03 Thread Loft_Tester

I've ran into this in the past as well.  The only way is to send it as
a string
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---