When I execute on Windows7+Ruby1.9.2+watir-webdriver this test script:
# encoding: utf-8
require "rubygems"
require "watir-webdriver"
ie = Watir::Browser.new :ie
ie.goto "www.tilde.eu"
ie.select_list(:name => "tr-direction").select "Latvian-English"
ie.select_list(:name => "tr-direction").selected? "Latvian-English"
ie.text_field(:class => "tr-area").set "skolas dārzā aug divas priedes"
ie.element_by_xpath("/html/body/div[3]/div/div/div/section/div/div/div/form/table/tbody/tr/td[3]/input").click
Watir::Wait.until { ie.text.include? "About Tilde Machine Translation" }
puts ie.div(:class => "translate_text_result").text
Script executes fine as it is in Firefox, but IE9 crashes when trying to set “ā” letter in text field and CMD shows following:
No translation for key. Assuming unicode input: 257
Timeout awaiting keypress: 82
Key up failed: 1400
Key down failed: 1400
Timeout awaiting keypress: 90
Key up failed: 1400
No translation for key. Assuming unicode input: 257
Key down failed: 1400
Script executes completely in Chrome, but still some warning in CMD are shown:
Started ChromeDriver
port=52409
version=14.0.836.0
[0825/095000:WARNING:webdriver_key_converter.cc(271)] No translation for key code. Code point: 257
[0825/095000:WARNING:webdriver_key_converter.cc(271)] No translation for key code. Code point: 257
Do I need to specify anything else apart from # encoding: utf-8 for it to work correctly in IE and Chrome?
I suggest to excecute above script on your computer to determine if this is common issue or just something in my configuration.
This is a known bug in the IE driver, which you can follow here. The warnings in Chrome are harmless, though they probably shouldn’t be printed by default.