Enter Non-English Character in Text Field
by Željko Filipin
I use Watir a lot. I wanted to set a text field to
željko. I did not know it would hard. I tried this code.
But, text field was set to
eljko or some other string (depending if I try from irb, or from file that is saved in some encoding).
I searched wtr-general and found different solutions.
to the top of the file.
TextField#value= instead of
I saved file as UTF-8.
[...] I have a Watir script [...] It reads the inputs from an Excel file into an Array and then I use the array data to populate the text fields. [...] I didn't use any special 'require' lines or KCodes. I just let Excel worry about holding the data [...]
I tried it, and it worked! It was simple, too. Just a few lines of code.tags: code - ruby