What is the use of listener annotation in TestNG

0 votes
@listener, what is the use of it in TestNG? How can it be used and what are the benefits of using @listener?
Jan 2, 2019 in Selenium by Sradha
• 1,760 points
2,816 views

1 answer to this question.

0 votes

 @listeners are used to configure reports and logging in TestNG. One of the most widely used listeners in TestNG is @ITestListener interface. It has methods like onTestStart, onTestSuccessonTestFailureonTestSkipped etc. You can implement this interface creating a listener class of our own. Then, you shall add the listeners annotation (@Listeners) in the Class which was created. This way @listener is used in TestNG. 

answered Jan 2, 2019 by Shuvodip

Related Questions In Selenium

0 votes
1 answer

What is the use of grouping in testNG?

Grouping is the method used to separate ...READ MORE

answered Dec 27, 2018 in Selenium by Trisha
1,080 views
0 votes
1 answer

What is the use of @Rule annotation in JUnit?

Hello Sarfaraz, JUnit provides special kind of handling ...READ MORE

answered Jun 19, 2019 in Selenium by anonymous
• 28,140 points
1,654 views
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,891 views
0 votes
1 answer

What is the use of Sibling in Xpath?

Using sibling keyword, we can fetch a ...READ MORE

answered Jan 10, 2019 in Selenium by Frankie
• 9,830 points
1,882 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,874 views
0 votes
1 answer

What is the use of invocationcount in TestNG?

Hey Owen, The invocationcount attribute tells how many ...READ MORE

answered Jun 19, 2019 in Selenium by anonymous
• 28,140 points
9,449 views
0 votes
1 answer

What is the use of deSelectAll() method in Selenium Webdriver?

Hello Inderjeet, deselectAll() method is useful to ...READ MORE

answered May 31, 2019 in Selenium by Yogesh
6,451 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP