I recently had a similar problem. I wanted to enter accented character to
text field. Paul suggested that I put text with accented character to Excel
file, then in Ruby script get that text from Excel file and put it in
variable and use it in my script. And it worked. I do not have Excel at this
machine so I can not try this out, but something like this should work.

require 'watir'
excel = WIN32OLE::new('excel.Application')
workbook = excel.Workbooks.Open('C:\data.xls') # open file
worksheet = workbook.Worksheets(1) # the first worksheet
cell = worksheet.Range('a1')['Value'] # value of single cell at position A1
ie = Watir::IE.start("http://app.com/";) # start IE and go to app.com
ie.select_list(:index, 1).select(cell) # select value using text from Excel

For more information see

http://forums.openqa.org/message.jspa?messageID=19274
http://zeljkofilipin.com/2007/02/26/enter-non-english-character-in-text-field/
--
Zeljko Filipin
zeljkofilipin.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to