I am creating a no code low code framework using playwright with Nodejs. I want to print custom messages in the report based on the outcome of the assertions.
Is there a way i can store the result of the assertion and evaluate the same to generate the custom message. Below is an example: const outcome = expect(username).toHaveText(‘admin’) If(outcome == true){ Print a passed message to report }else{ Print a failed message to report }
This thread is trying to answer question "How to print custom message to html report based on the outcome of assertions?"
Guys… thank you for reading out the question and taking out the time to reply. As a workaround I implemented allure report and in playwright config file i marked detail option as false. As a result, pw api calls are not printing in the report and only the test.step() caption is getting printed. This is not exactly what i wanted but for now i think this is the best option i can proceed with… let me know if you have any suggestions for me
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].