I have a little test script to run in Watir that searches "books" on google images and then takes a screenshot of the result.
require "watir-webdriver"
browser = Watir::Browser.new :ie
browser.goto "http://www.google.com/"
puts browser.url
browser.a(:text => "Images").click
puts browser.title
browser.text_field(:name => "q").set "book"
browser.button(:value => "Search by image").click
browser.screenshot.save 'screenshots\search-results.png'
browser.close
However I would also like to include a log in a .txt file of the information I am "putting" into the console.
How would I go about doing this?