Watir 1.6.5, ruby 1.8.7 and character encoding problem

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
The code I was using was:

require ‘watir’
@nav.text_field(:name,“q”).set txt

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

Any idea on how to solve this?

Thanks a lot.

I think I found the solution on

I solved it commenting the line WIN32OLE.codepage = WIN32OLE::CP_UTF8 on
win32ole.rb file

Further info:

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'
puts nav.text

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs