Tuesday, April 14, 2020

LeanFT - PDF contain verification for automation testing


LeanFT - PDF contain verification for automation testing 


Following explanation and the code for verify the given contain is in the given PDF which is located at given path and given page range .And also verify the given relative element is in next to each other It was not possible to verify relative element in different line it should be located in same Line because in the code I was reading the pdf line by line  .

As per my knowledge not able to verify the image/logo in given pdf  and the Column  values in table  .  I was trying to find the way to verify the column values but i failed.Row values can be verify from relative element verification .As a example  -  A | B C D E (Getting key as very first vale and separate the value form "|" .Then inside the code split form "|" and identify the relevant Key and the value sparately)



public final void checkDocument(final String docType,
final String filePath, final String pageNumberRange,
final String verifyType, final String inputString,
final boolean stopOnFaliure, final Object... customError) {

String path = parentMethod(filePath);

if ("pdf".equalsIgnoreCase(docType)) {
pdfVerify(path, pageNumberRange, verifyType, inputString,
stopOnFaliure, customError);
} else {
                      //Passed to report it is failed
reportresult(true, "CHECK DOCUMENT :" + docType + " :", "FAILED",
"Unknown doc type passed :" + " " + docType
+ ". Accepted doc types : "
+ "pdf, excel, xml, text");
checkTrue(false, stopOnFaliure, "Unknown doc type passed :" + " "
+ docType + ". Accepted doc types : " + "pdf");
}

}




No comments:

Post a Comment

MS VISUAL STUDIO CODEDUI TEST FRAMEWORK AND TEST EXECUTION

MS VISUAL STUDIO CODEDUI TEST FRAMEWORK AND TEST EXECUTION  1.0 Pre-Requisites for the execution 1.1 Software Requirements ...