Home Core Java Overview Maven Tutorials

Tuesday, 30 July 2019


<nav class="menu"> <ul class="active"> <li class="current-item"><a href="#">Home</a></li> <li><a href="#">My Work</a></li> <li><a href="#">About Me</a></li> <li><a href="#">Get in Touch</a></li> <li><a href="#">Blog</a></li> </ul> <a class="toggle-nav" href="#">&#9776;</a> <form class="search-form"> <input type="text"> <button>Search</button> </form> </nav>

Wednesday, 24 July 2019

Listeners In Selenium and TestNG

JDBC in java


Listeners are interfaces used in selenium webdriver script that modifies the default behaviour of the system.

The main purpose of listeners is to create Logs and reports.

We can fully customize the logs using Listeners.

Types of Listeners
1). WebDriver Listeners
2). TestNG Listeners

Types of Listeners in TestNG :-
There are several interfaces that allow you to modify TestNG behaviour.
Here are few listeners :-
1).IAnnotation Transformer
2).IAnnotation ransformer2
3). IHookable
4). IInvokeMethodListener
5). IMethodInterceptor
6). Ireporter
7). ISuiteListener
8). ITestListener

How to implement the Listener :-
a). Extends 'TestListenerAdapter' Class
b). Implement Interface 'ITestListener'
also we implement Listeners in Class Level as well as Suite Level