首页 > ruby > ruby添加字符串到文件

ruby添加字符串到文件

2009年4月27日 发表评论 阅读评论

ruby添加字符串到文件比较tricky,我用的代码如下:

file = File.open(“test.txt”, “a”)
ie111.image(:class => /xyz/, :index => 1).click
html1 = ie111.text_field(:id, “html_box”).value
file << html1
file.close



分类: ruby 标签:
  1. none
    2009年9月10日09:54 | #1

    语言都很相似啊

  1. 本文目前尚无任何 trackbacks 和 pingbacks.
      
                  
      

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word