public void printPageErrors() throws Exception {
//Capture all errors and store them In array.
List
System.out.println("Total No Of JavaScript Errors : " + Errors.size());
//Print Javascript Errors one by one from array.
for (int i = 0; i < Errors.size(); i++) {
System.out.println("Error Message : " + Errors.get(i).getErrorMessage());
System.out.println("Error Line No : " + Errors.get(i).getLineNumber());
System.out.println(Errors.get(i).getSourceName());
System.out.println();
}
}
need to download "JSErrorCollector-0.5.jar"
No comments:
Post a Comment