I am currently utilizing Protractor, written in typescript, to conduct tests on a live website. I am seeking guidance on how to generate log messages when a Protractor test fails. Presently, the only feedback received is a simple YES/NO message, as shown below:
10) Query page accuracy test. Comparison of page data to data extracted from excel. Test begins...
Message:
Expected false to be truthy.
Stack:
Error: Failed expectation
at C:\xampp\htdocs\kap\frontend\src\app\qa\qa.js:147:103
at step (C:\xampp\htdocs\kap\frontend\src\app\qa\qa.js:33:23)
at Object.next (C:\...
This is the line where the test is conducted:
expect(htmlValue == excelValue || (htmlValue === "0" && excelValue == "NaN")).toBeTruthy();
I am interested in adding more informative error messages for failed tests. Any assistance would be appreciated since I am relatively new to Protractor, although I have experience with QA automation tests.