watir 1.6.5, ruby 1.8.7 and character encoding problem

M

Mario Ruiz

Hi,
I was updating my tests to work for watir 1.6.5 and ruby 1.8.7 since I
had them before on watir 1.5.3 and ruby 1.8.6.
Since then when I try to set a text field on any web page the characters
don't correspond to the original ones and that was working perfectly
before.
The code I was using was:

require 'watir'
@nav=Watir::Browser.new()
@nav.goto("www.google.com")
txt="ñÑáéíóú"
@nav.text_field:)name,"q").set txt
@nav.close()


Instead of writing the characters "ñÑáéíóú" what it is written is
�������

Any idea on how to solve this?

Thanks a lot.
 
M

Mario Ruiz

Now I'm trying the same thing for firefox or watir-wedbriver and the
same problem there, no idea how to solve it
for example try this and you will see that the result is not with the
correct characters:

require 'watir-webdriver'
nav=Watir::Browser.new:)firefox)
nav.goto("www.google.is")
puts nav.text
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top