@Test public void val() {

    Document doc = Jsoup.parse("<input value='one' /><textarea>two</textarea>");
    Elements els = doc.select("input, textarea");
    assertEquals(2, els.size());
    assertEquals("one", els.val());
    assertEquals("two", els.last().val());
    
    els.val("three");
    assertEquals("three", els.first().val());
    assertEquals("three", els.last().val());
    assertEquals("<textarea>three</textarea>", els.last().outerHtml());
}