在将网页文本提交到Ruby中时,Ruby可以识别这些值 [英] Ruby could recognize the values when putting into a webpage text filed

查看:85
本文介绍了在将网页文本提交到Ruby中时,Ruby可以识别这些值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Excel中有一些值,如下所示:

I have some values in my Excel as below:

1136-ΑΓΙΩΝ ΑΝΑΡΓΥΡΩΝ
1137-ΑΙΓΑΛΕΩ

但是使用脚本,当我将其放入归档的网页时,它们是 保存到字段中,如下所示:

But with script when I am putting those into a webpage filed, they are saving into the field as below:

136-αΓ?Ω? α?α?Γ??Ω?
1137-α?Γα?εΩ

我正在使用Ruby 1.9.3最新版本.我正在使用win32ole库 Excel-2010.

I am using Ruby 1.9.3 latest version. I am using win32ole library with Excel - 2010.

until number_of_list_values == 0

  number_of_list_values = number_of_list_values - 1
  element = driver.find_element :id => "codeExt"
  element.send_keys wbs.cells(rows,2).value
  element = driver.find_element :id => "descriptionExt"
  element.send_keys wbs.cells(rows,3).value
  driver.find_element(:name, "btnSaveandNew").click if 
number_of_list_values != 0
  wbs.cells(rows,5).value = "done"
  rows = rows + 1
  driver.find_element(:name, "btnSave").click if number_of_list_values 
== 0

end

推荐答案

您必须以某种方式设置正确的编码才能读取这些值

You have to somehow set the proper encoding to read those values

这篇关于在将网页文本提交到Ruby中时,Ruby可以识别这些值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆