Reputation: 31
I have two class one with test method and other one is Listener class. I am closing browser onTestFailure in listener, for this i need to pass driver from test method to listener. How can I pass driver to onTestFailure method in listener. Thanks.
Upvotes: 1
Views: 824
Reputation: 5740
The one which closes the browser/driver should be the one which created it too.
What you can do is:
ITestContext
ITestContext
and use itUpvotes: 1