Switching to a window 24/08/2012
# Using a specific window provided that the user already knows which window to select
browser.window.use

# If the user first needs to find a window, one way is to loop through windows and 
# compare a specific attribute. For example:
browser.windows.each do |w|
  w.use if w.title =~ /Google/
end

# The above could cause havoc in there are multiple windows with a similar title.
# Do be careful with the conditions.

WebDriver has methods to use a specific window in case multiple windows are open. The user will first have to find the one that he wants to use. Ways to do that include comparing the title or the URL to the expected one.