Take screenshots in failed scenarios

There are scenarios where our test case fails and we use mostly logs to see what actions performed and how our test case failed,
but some times when we need to see the screenshot of what exactly happened on the browser while running scripts…
Even manual QA folks take screenshots of the AUT in cases of test case fails or passes… [kind of proof to the execution]

So the same, we can take screenshots in automation as well.

below is one example, where we are validating with valid credentials to login to gmail,
if logged in, check to see inbox link should display and make test case pass
else, make test case fail as our valid credentials did not work

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *