shouldn't we infer the type of expected value based on the elements tag and type attribute? (think select)