diff --git a/src/main/java/br/com/ases/business/impl/AvaliacaoBusinessImpl.java b/src/main/java/br/com/ases/business/impl/AvaliacaoBusinessImpl.java index 19f7e65..fd50482 100644 --- a/src/main/java/br/com/ases/business/impl/AvaliacaoBusinessImpl.java +++ b/src/main/java/br/com/ases/business/impl/AvaliacaoBusinessImpl.java @@ -106,10 +106,29 @@ public class AvaliacaoBusinessImpl implements AvaliacaoBusiness { for (String elementoBuscar : elementosBuscar) { for (Element element : documento.getAllElements(elementoBuscar)) { for (String atributoBuscar : atributosBuscar) { + + if(element.getStartTag().getName().equalsIgnoreCase("input")) + { + if(!element.getAttributeValue(atributoBuscar).equalsIgnoreCase("button") + && !element.getAttributeValue(atributoBuscar).equalsIgnoreCase("reset") + && !element.getAttributeValue(atributoBuscar).equalsIgnoreCase("submit") + && !element.getAttributeValue(atributoBuscar).equalsIgnoreCase("hidden") + && !element.getAttributeValue(atributoBuscar).equalsIgnoreCase("image")) + { + qtdItens = qtdItens + (element.getAttributeValue(atributoBuscar) != null? 1 : 0); + } + }else if(element.getStartTag().getName().equalsIgnoreCase("textarea") || + element.getStartTag().getName().equalsIgnoreCase("select")) + { + qtdItens++; + } + else + { qtdItens = qtdItens + (element.getAttributeValue(atributoBuscar) != null? 1 : 0); } } } + } }else if(tipoTeste.equalsIgnoreCase("startTag")) { qtdItens = documento.getAllStartTags().size(); diff --git a/src/main/webapp/WEB-INF/testeEselo.properties b/src/main/webapp/WEB-INF/testeEselo.properties index 6b89245..c2e8594 100644 --- a/src/main/webapp/WEB-INF/testeEselo.properties +++ b/src/main/webapp/WEB-INF/testeEselo.properties @@ -69,7 +69,7 @@ 5.3.1=proporcional=false=e=videoembed 5.4.1=proporcional=false=e=audio=embed 6.1.1=proporcional=true=e=input -6.2.1=proporcional=true=e=label +6.2.1=proporcional=true=ea=einput=etextarea=eselect=atype 6.3.1=falso=false=ea=eFORM=atabindex 6.4.1=falso=false=ea=eFORM=aONCHANGE=aONBLUR=aONFOCUS=aONFORMCHANGE=aONFORMINPUT=aONINPUT=aONINVALID=aONRESET=aONSELECT=aONSUBMIT=aONKEYDOWN=aONKEYPRESS=aONKEYUP=aONCLICK 6.4.2=falso=false=ea=eFORM=aONDBLCLICK=aONDRAG=aONDRAGEND=aONDRAGENTER=aONDRAGLEAVE=aONDRAGOVER=aONDRAGSTART=aONDROP=aONMOUSEDOWN=aONMOUSEMOVE=aONMOUSEOUT=aONMOUSEOVER=aONMOUSEUP=aONMOUSEWHEEL=aONSCROLL -- libgit2 0.21.2