I am unable to click a button to HtmlUnit , already tried by the name and ID , it does not have a Value, already I put waiting and still nothing .
HtmlButton button = (HtmlButton) page2.getElementById("imbInserir");
try {
button.click();
}catch(Exception e) {
System.out.println("I could not push the button");
e.printStackTrace();
return;
}
}
}
Html Page Button:
<input type="image" name="ctl00$ContentPlaceHolderConteudoPagina$dtvFiltragem$imbInserir" id="imbInserir" title="Inserir Apontamento" src="../Imagens/inserir.png">
Console:
java.lang.NullPointerException at htmlunit.Acesso.main(Acesso.java:74)