def set2(selector, value=nil)
      elem = element(xpath: selector).to_subtype

      case elem
      when Watir::Radio
        elem.set
      when Watir::Select
        elem.select value
      when Watir::Input
        elem.set value
      when Watir::TextArea
        elem.set value
      else
        elem.click
      end
    end
def set2(selector, value=nil)
      elem = element(xpath: selector).to_subtype

      case elem
      when Watir::Radio
        elem.set
      when Watir::Select
        elem.select value
      when Watir::Input
        elem.set value
      when Watir::TextArea
        elem.set value
      else
        elem.click
      end
    end
quick set value.

 @example

  form = browser.form(id: "foo")
  form.set2("//input[@name='value']", "hello")
  form.set2("//input[@name='check']", true)
  form.set2("//select[@name='foo']", "Bar")
  form.set2("//textarea[@name='foo']", "bar")