Thx for help but still same problem.
I have fixed your advices:
irb(main):112:0> answers = ["answer1", "answer2", "answer3"]
=> ["answer1", "answer2", "answer3"]
irb(main):113:0> ie.text_field(:name, "multiChoiceAnswers").set
(answers.each do
|item| item + "\n" end)
ArgumentError: comparison of String with 128 failed
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:381:in `>'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:381:in `characters_in'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:368:in `type_by_character'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:334:in `set'
from (irb):113
from :0
Any other ideas?
On Jun 8, 1:14 pm, jason wrote:
> Oh and your text array should look as follows:
>
> answers = ["answer1","answer2","answer3"]
>
> On 8 Jun., 13:13, jason wrote:
>
> > Your code is wrong - line is using puts ???
>
> > ie.textfield(:name, "multiChoiceAnswers").set(answers.each do |item|
> > puts item end)
>
> > change to
>
> > ie.textfield(:name, "multiChoiceAnswers").set(answers.each do |item|
> > item + "\n" )
>
> > Best R
> > Jason
>
> > On 8 Jun., 12:46, "grzegorz.smaj...@gmail.com"
>
> > wrote:
> > > Hi,
>
> > > I face a problem with putting answers in textarea in new lines
>
> > > ex:
>
> > > I have a textarea:
>
> > > > > align="left" >
>
> > > I would like to put into that textarea answers in each line:
>
> > > [Answer1]
> > > [Answer2]
> > > [Answer3]
>
> > > When I create an array with answers:
> > > answers = []
> > > answers = "[answer1],[answer2],[answer3]"
>
> > > then:
> > > ie.textfield(:name, "multiChoiceAnswers").set(answers.each do |item|
> > > puts item end)
>
> > > I get the fallowing error:
>
> > > ArgumentError: comparison of String with 128 failed
> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:381:in `>'
> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:381:in `characters_in'
> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:368:in `type_by_character'
> > > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> > > input_elements
> > > .rb:334:in `set'
>
> > > Can any one advise?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---