Taking a PNG screenshot 26/07/2012
# The following method is updated to use the new screenshot API.
# Thanks @p0deje for the information

# Taking a screenshot

# Saving a screenshot to a file
browser.screenshot.save "<name of file>.png"

# The old selenium-webdriver based method is still available too
browser.driver.save_screenshot("<name of file>.png")

The screenshot functionality of Webdriver has been updated to have it's own method instead of the selenium-webdriver method. The filename defines the filetype of the screenshot and allows only .png.