watir takes long time to set long string, watir要很长的时间设置长字符串

watir is great, though if you want to set long string to text field or textarea,

it may take a long long time to finish it when you use statement as

$browser.text_field(:name => "comment").set('long long ...... string ...')
fortunately, you can use this statement to avoid it, it is fast to set the long string with watir
$browser.text_field(:name => "comment").value = ($comments)
watir是个不错的东东,但如果你用set方法去设置一个很长的字条串的话, 那就可能需要很长的时间才能执行完这个语句,
不用担心你可以用直接设置value的值, 这样就很快了, 根本不用等待,就执行完成了

1 thought on “watir takes long time to set long string, watir要很长的时间设置长字符串”

  1. Aw, this was a really nice post. In idea I want to put in writing like this moreover – taking time and precise effort to make an excellent article… but what can I say… I procrastinate alot and by no means seem to get one thing done.

Comments are closed.