implementing listeners to take screenshots for junit and testng.