Jitsi-meet-torture how to register a listener for a certain Jitsi event

Dear all,
Among the torture tests do you have some code sample to register a listener for the event JitsiConferenceEvents.CONFERENCE_FAILED ?
We customized the meet-jitsi so that it doesnot show up the security dialog to type the password. Instead , in the code, we have to call the function APP.store.dispatch(setPassword(
)); to join the conference.
With torture, I would like to do the same. But I get stuck with registering a listener to the event JitsiConferenceEvents.CONFERENCE_FAILED, so that whenever I receive that event I can call a javascript to provide the password.
Many thank in advance for your helps

You cannot add listeners from the selenium part that will execute java code.
You can inject whole js snippets that can work independently

Thank you Damencho. I will try to do that way.