Created
June 1, 2009 20:19
-
-
Save mikegolod/121719 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'safariwatir' | |
RU_ALPHABET = "абвгдеёжзиклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ" | |
#First, filling textfield | |
b = Watir::Safari.new | |
b.goto('http://www.google.com/') | |
b.text_field(:name,'q').set(RU_ALPHABET) | |
b.text_field(:name,'q').verify_contains(RU_ALPHABET) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/safariwatir.rb b/lib/safariwatir.rb | |
index 79ff720..68af5be 100644 | |
--- a/lib/safariwatir.rb | |
+++ b/lib/safariwatir.rb | |
@@ -382,8 +382,8 @@ module Watir | |
@scripter.focus(self) | |
@scripter.highlight(self) do | |
clear_text_input | |
- value.length.times do |i| | |
- append_text_input(value[i, 1]) | |
+ value.each do |letter| | |
+ append_text_input(letter) | |
end | |
end | |
@scripter.blur(self) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment