ElementConverter.class's javadoc states that @param node The matched {@code element} but it is not true. HtmlFieldWithConverter does not perform css selection before passing element to convert() method so the node element is actually the whole HTML document.
And even the custom convert test is faulty, you can change
|
"<p id=\"today-weather\">Today is Saturday. Weather is sunny</p>" |
to:
"<p id=\"kdjkfajjdfhb-it-doesnt-matter\">Today is Saturday. Weather is sunny</p>" and the test will still pass successfully.
ElementConverter.class's javadoc states that@param node The matched {@code element}but it is not true.HtmlFieldWithConverterdoes not perform css selection before passing element to convert() method so thenodeelement is actually the whole HTML document.And even the custom convert test is faulty, you can change
jspoon/jspoon/src/test/java/pl/droidsonroids/jspoon/ConverterTest.java
Line 71 in bfdbea4
to:
"<p id=\"kdjkfajjdfhb-it-doesnt-matter\">Today is Saturday. Weather is sunny</p>"and the test will still pass successfully.