@Override
public void preStateCrawling(CrawlerContext session,
ImmutableList<CandidateElement> candidateElements, StateVertex state) {
for (CandidateElement candidate : candidateElements) {
HTMLAnchorElementImpl impl = (HTMLAnchorElementImpl) candidate.getElement();
impl.setName("fail");
impl.setId("eventually");
impl.setHref("will");
impl.setTextContent("This");
candidate.getIdentification().setValue("/HTML[1]/BODY[1]/FAILED[1]/A[1]");
}
}
});
builder.addPlugin(new OnFireEventFailedPlugin() {