use of org.jsoup.select.Elements in project Asqatasun by Asqatasun.
the class DOMHandlerImpl method getTotalNumberOfElements.
@Override
public int getTotalNumberOfElements() {
if (totalNumberOfElement == -1) {
totalNumberOfElement = cssLikeSelectNodeSet("*").getSelectedElementNumber();
selectedElements = new Elements();
}
return totalNumberOfElement;
}
use of org.jsoup.select.Elements in project Asqatasun by Asqatasun.
the class TextEmptinessCheckerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mockTextElementBuilder = createMock(TextElementBuilder.class);
mockSSPHandler = createMock(SSPHandler.class);
elements = new Elements();
element = new Element(Tag.valueOf("div"), "");
mockTestSolutionHandler = createMock(TestSolutionHandler.class);
mockProcessRemarkService = createMock(ProcessRemarkService.class);
}
use of org.jsoup.select.Elements in project Asqatasun by Asqatasun.
the class CaptchaElementSelector method getSiblingsAndParents.
/**
*
* @param el
* @return all the parents and the siblings of the element
*/
private Elements getSiblingsAndParents(Element el) {
Elements siblingsAndParents = new Elements();
siblingsAndParents.addAll(el.siblingElements());
siblingsAndParents.addAll(el.parents());
return siblingsAndParents;
}
use of org.jsoup.select.Elements in project Asqatasun by Asqatasun.
the class TextNotIdenticalToAttributeCheckerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mockTextElementBuilder = createMock(TextElementBuilder.class);
mockSSPHandler = createMock(SSPHandler.class);
elements = new Elements();
element = new Element(Tag.valueOf("div"), "");
element.attr(AttributeStore.ALT_ATTR, "test");
mockTestSolutionHandler = createMock(TestSolutionHandler.class);
mockProcessRemarkService = createMock(ProcessRemarkService.class);
}
use of org.jsoup.select.Elements in project Asqatasun by Asqatasun.
the class TextOnlyContainsNonAlphanumericalCharactersCheckerTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
mockTextElementBuilder = createMock(TextElementBuilder.class);
mockSSPHandler = createMock(SSPHandler.class);
elements = new Elements();
element = new Element(Tag.valueOf("div"), "");
mockTestSolutionHandler = createMock(TestSolutionHandler.class);
mockProcessRemarkService = createMock(ProcessRemarkService.class);
}
Aggregations