{"id":304,"date":"2011-11-21T12:42:21","date_gmt":"2011-11-21T04:42:21","guid":{"rendered":"http:\/\/www.genepeng.com\/?p=304"},"modified":"2011-11-25T11:36:05","modified_gmt":"2011-11-25T03:36:05","slug":"watir-takes-long-time-to-set-long-string-watir%e8%a6%81%e5%be%88%e9%95%bf%e7%9a%84%e6%97%b6%e9%97%b4%e8%ae%be%e7%bd%ae%e9%95%bf%e5%ad%97%e7%ac%a6%e4%b8%b2","status":"publish","type":"post","link":"https:\/\/www.genepeng.com\/index.php\/304","title":{"rendered":"watir takes long time to set long string, watir\u8981\u5f88\u957f\u7684\u65f6\u95f4\u8bbe\u7f6e\u957f\u5b57\u7b26\u4e32"},"content":{"rendered":"<p>watir is great, though\u00a0if you want to set long string to text field or textarea,<\/p>\n<p>it may take a long long time to finish it when you use statement as<\/p>\n<pre>$browser.text_field(:name =&gt; \"comment\").set('long long ...... string ...')<\/pre>\n<pre>fortunately, you can use this statement to avoid it, it is fast to set the long string\u00a0with watir<\/pre>\n<pre>$browser.text_field(:name =&gt; \"comment\").value = ($comments)<\/pre>\n<pre>watir\u662f\u4e2a\u4e0d\u9519\u7684\u4e1c\u4e1c\uff0c\u4f46\u5982\u679c\u4f60\u7528set\u65b9\u6cd5\u53bb\u8bbe\u7f6e\u4e00\u4e2a\u5f88\u957f\u7684\u5b57\u6761\u4e32\u7684\u8bdd\uff0c \u90a3\u5c31\u53ef\u80fd\u9700\u8981\u5f88\u957f\u7684\u65f6\u95f4\u624d\u80fd\u6267\u884c\u5b8c\u8fd9\u4e2a\u8bed\u53e5\uff0c<\/pre>\n<pre>\u4e0d\u7528\u62c5\u5fc3\u4f60\u53ef\u4ee5\u7528\u76f4\u63a5\u8bbe\u7f6evalue\u7684\u503c\uff0c \u8fd9\u6837\u5c31\u5f88\u5feb\u4e86\uff0c \u6839\u672c\u4e0d\u7528\u7b49\u5f85\uff0c\u5c31\u6267\u884c\u5b8c\u6210\u4e86<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>watir takes long time to set long string, watir\u8981\u5f88\u957f\u7684\u65f6\u95f4\u8bbe\u7f6e\u957f\u5b57\u7b26\u4e32<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,15],"tags":[],"_links":{"self":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts\/304"}],"collection":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":3,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":308,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/posts\/304\/revisions\/308"}],"wp:attachment":[{"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.genepeng.com\/index.php\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}