@Test public void testHTMLParser_getElements_html_checkTitle() { Elements elements = HTMLParser.getElements(SAMPLE_HTML, "title"); assertEquals(elements.size(), 1); assertEquals(elements.first() .ownText(), "My title"); }
public static Elements getElements(String html, String tag) { return getElements(parse(html), tag); }
HTMLParser { public static Elements getElements(String html, String tag) { return getElements(parse(html), tag); } }
HTMLParser { public static Elements getElements(String html, String tag) { return getElements(parse(html), tag); } private  HTMLParser(); }
HTMLParser { public static Elements getElements(String html, String tag) { return getElements(parse(html), tag); } private  HTMLParser(); static Document parse(String html); static Elements getElements(String html, String tag); static Elements getElements(Document document, String tag); static List<String> getAttributeValueFromElements(Elements elements, String attributeKey); static List<String> getTextFromElements(Elements elements); }
HTMLParser { public static Elements getElements(String html, String tag) { return getElements(parse(html), tag); } private  HTMLParser(); static Document parse(String html); static Elements getElements(String html, String tag); static Elements getElements(Document document, String tag); static List<String> getAttributeValueFromElements(Elements elements, String attributeKey); static List<String> getTextFromElements(Elements elements);  }