()
| 51 | } |
| 52 | |
| 53 | @Test public void hasAttr() { |
| 54 | Document doc = Jsoup.parse("<p title=foo><p title=bar><p class=foo><p class=bar>"); |
| 55 | Elements ps = doc.select("p"); |
| 56 | assertTrue(ps.hasAttr("class")); |
| 57 | assertFalse(ps.hasAttr("style")); |
| 58 | } |
| 59 | |
| 60 | @Test public void hasAbsAttr() { |
| 61 | Document doc = Jsoup.parse("<a id=1 href='/foo'>One</a> <a id=2 href='https://jsoup.org'>Two</a>"); |
no test coverage detected