TestNG Tutorial #16 - How to Capture Screenshot for Failed Tests in TestNG
Вставка
- Опубліковано 11 лют 2025
- Get all my courses for USD 5.99/Month - bit.ly/all-cou...
🔸FREE Training's at training.rcvac... 🔔SUBSCRIBE to CHANNEL: bit.ly/2YGU6JM
In this TestNG tutorial we will learn how to Capture Screenshot for Failed Tests in TestNG. TestNG provides @Listeners annotation to implement listeners in our test case and capture the screenshot on failure of any test case while test execution.
Help me in spreading the knowledge, please hit LIKE, SHARE and SUBSCRIBE for latest tutorials. More tutorial playlists below:
✅ ALL PLAYLISTS (Software Testing Mentor)🔸 / softwaretestingmentor
✅ ALL PLAYLISTS (RCV Academy)🔸 / @rcvacademy
✅ JIRA BEGINNER TUTORIAL🔸 bit.ly/jira-beg...
✅ JIRA WORKFLOW TUTORIAL🔸 bit.ly/2EzKOEB
✅ JIRA ADMINISTRATION TUTORIAL🔸 bit.ly/36MPPFR
✅ JIRA TUTORIAL INTERMEDIATE🔸 bit.ly/Atlassia...
✅ JIRA TUTORIALS🔸 bit.ly/jira-tut...
✅ ZEPHYR TUTORIAL🔸 bit.ly/zephyr-f...
✅ SOAPUI TUTORIAL🔸 bit.ly/Sopui-tu...
✅ JSONPath TUTORIAL🔸 bit.ly/2sIZIFG
✅ POSTMAN TUTORIAL🔸 bit.ly/2PBbhI7
✅ ISTQB AGILE TESTER CERTIFICATION TUTORIAL🔸 bit.ly/istqb-ag...
✅ ISTQB FOUNDATION LEVEL CERTIFICATION TUTORIAL🔸 bit.ly/istqb-fo...
✅ CUCUMBER SELENIUM TUTORIAL🔸 bit.ly/cucumber...
✅ TESTRAIL TUTORIAL🔸 bit.ly/testrail...
✅ AGILE TUTORIALS🔸 bit.ly/agile-tu...
✅ PYTHON TUTORIALS🔸 bit.ly/python-p...
✅ PYTHON BEHAVE TUTORIALS🔸 bit.ly/python-b...
✅ PRACTITEST TUTORIAL🔸 bit.ly/practite...
✅ JAVA TUTORIAL🔸 bit.ly/2F1iL1B
✅ ZEPHYR TUTORIAL🔸 bit.ly/zephyr-f...
🔶 ENROL IN MANY FREE TRAININGS ON RCV ACADEMY PORTAL 🔶
training.rcvaca...
🔶 FOLLOW US ON TWITTER 🔶
/ rcvacademy
/ swtmentor
/ mrmverma
🔶 LIKE US ON FACEBOOK 🔶
/ softwaretestingmentor
/ rcvacademy47
🔶 OUR TUTORIAL WEBSITES 🔶
www.softwarete...
www.rcvacademy...
🔶 GET MY TRAININGS ON UDEMY 🔶
www.udemy.com/...
#TestNGTutorial #TestNG #TestAutomation #SeleniumWebDriverTutorial #SeleniumWebDriver #SoftwareTesting #RcvAcademy #SoftwareTestingMentor
🔸FREE Training's at training.rcvacademy.com 🔔SUBSCRIBE to CHANNEL: bit.ly/2YGU6JM
This is the best explanation I've ever seen!! Thank you sm!!
Man gaye Guru, Superb!!
Sir , the way of your explanation is really good.Thank You.
Thank you very much. Keep watching and sharing.
god level classes
Thank you sir..i really wanted to become a Automation tester..bt there is lack of vacancies
Thank you for this. Will it work for paralell test ng execution ?
How can I use in the data-driven framework?
Hi Sir,
Could you please share your codes on git? it will be helpful.
Thanks,
Abhishek
Screenshot karne ka code kaha hai. 16th video me kaha gaya ki previous video me hai. kuch bhi nahi hai
i am getting error
Cannot invoke "org.openqa.selenium.TakesScreenshot.getScreenshotAs(org.openqa.selenium.OutputType)" because "this.driver" is null. can anyone help pls
Hi sheetal this happens when you don't make the driver as static. change the driver to static and you will see that this method will be executed successfully.
@@sssaamm29988 Hi Sampath, can you please help me understand, how static is clearing this error? We are inheriting the basetest to screenshot utility. Hence driver object has same scope in utility just like in baseclass. Then why static is mandatory.
Hi @@sssaamm29988 after making driver as static still getting same issue : Cannot invoke "org.openqa.selenium.TakesScreenshot.getScreenshotAs(org.openqa.selenium.OutputType)" because "utility.UtilTest.driver" is null
at utility.UtilTest.getscreenshot(UtilTest.java:18) , can u help me I am trying from last two days
happened for me as well , as I haven't extend basetest in my testcase
Hi Sir,
Facing this issue www.slf4j.org/codes.html#StaticLoggerBinder, can you tell me will version testNG suitable for this