def attach_browser(how, what, options = {})
      options.merge!(:browser => is_firefox? ? "Firefox" : "IE") unless options[:browser]
      begin
        options.merge!(:base_url => browser.context.base_url)
      rescue => e
        puts "failed to set base_url, ignore : #{e}"
      end
      WebBrowser.attach_browser(how, what, options)
    end
def attach_browser(how, what, options = {})
      options.merge!(:browser => is_firefox? ? "Firefox" : "IE") unless options[:browser]
      begin
        options.merge!(:base_url => browser.context.base_url)
      rescue => e
        puts "failed to set base_url, ignore : #{e}"
      end
      WebBrowser.attach_browser(how, what, options)
    end
Attach to existing browser window

  attach_browser(:title, "Page" )
  attach_browser(:url, "http://wwww..." )