use of org.asqatasun.rules.elementselector.ElementSelector in project Asqatasun by Asqatasun.
the class Aw22Rule08091 method select.
@Override
protected void select(SSPHandler sspHandler) {
// Selection of all links without target
ElementSelector linkWithoutTargetSelector = new SimpleElementSelector(LINK_WITHOUT_TARGET_CSS_LIKE_QUERY);
linkWithoutTargetSelector.selectElements(sspHandler, linkWithoutTarget);
// Selection of all links without target
ElementSelector fielsetNotWithinFormSelector = new SimpleElementSelector(FIELDSET_NOT_WITHIN_FORM_CSS_LIKE_QUERY);
fielsetNotWithinFormSelector.selectElements(sspHandler, fieldsetNotWithinForm);
totalNumberOfElements = sspHandler.getTotalNumberOfElements();
}
use of org.asqatasun.rules.elementselector.ElementSelector in project Asqatasun by Asqatasun.
the class Aw22Rule11012 method select.
@Override
protected void select(SSPHandler sspHandler) {
ElementSelector explicitLabelSelector = new InputFormElementWithExplicitLabelSelector();
explicitLabelSelector.selectElements(sspHandler, labels);
ElementSelector inplicitLabelSelector = new InputFormElementWithInplicitLabelSelector();
inplicitLabelSelector.selectElements(sspHandler, labels);
}
use of org.asqatasun.rules.elementselector.ElementSelector in project Asqatasun by Asqatasun.
the class Rgaa22Rule07091 method select.
@Override
protected void select(SSPHandler sspHandler) {
// Selection of all links without target
ElementSelector linkWithoutTargetSelector = new SimpleElementSelector(LINK_WITHOUT_TARGET_CSS_LIKE_QUERY);
linkWithoutTargetSelector.selectElements(sspHandler, linkWithoutTarget);
// Selection of all links without target
ElementSelector fielsetNotWithinFormSelector = new SimpleElementSelector(FIELDSET_NOT_WITHIN_FORM_CSS_LIKE_QUERY);
fielsetNotWithinFormSelector.selectElements(sspHandler, fieldsetNotWithinForm);
totalNumberOfElements = sspHandler.getTotalNumberOfElements();
}
use of org.asqatasun.rules.elementselector.ElementSelector in project Asqatasun by Asqatasun.
the class SeoRule07051 method select.
@Override
protected void select(SSPHandler sspHandler) {
ElementSelector selector = new SimpleElementSelector(H1_ELEMENT);
selector.selectElements(sspHandler, h1Elements);
// only keep one title when more than 2 are encountered
selector = new SimpleElementSelector(TITLE_ELEMENT);
selector.selectElements(sspHandler, titleElement);
if (titleElement.get().size() > 1) {
Element title = titleElement.get().iterator().next();
titleElement.clean().add(title);
}
}
use of org.asqatasun.rules.elementselector.ElementSelector in project Asqatasun by Asqatasun.
the class SeoRule08011 method select.
@Override
protected void select(SSPHandler sspHandler) {
ElementSelector es = new SimpleElementSelector(FLASH_CONTENT_CSS_LIKE_QUERY);
es.selectElements(sspHandler, decidableElements);
es = new SimpleElementSelector(SCRIPT_ELEMENT);
es.selectElements(sspHandler, notDecidableElements);
Iterator<Element> iter = notDecidableElements.get().iterator();
while (iter.hasNext()) {
Element script = iter.next();
if (!StringUtils.contains(script.html(), SWF_EXT)) {
iter.remove();
}
}
}
Aggregations