Jitsi-meet-torture how to set the room password

Dear All,
Thank you for making the jitsi-meet-torture. I found that the project is great for autotesting the jitsi server.
I would like to combine a maximum user test with the setting password feature. Would you please show me how to call the function room.join() from the context of the MaxUsersTest ?
Many thanks

Dear Damencho,
Thank you very much for your answer. Just now I can check your guide. It is indeed a good direction.
However, my situation is a little bit different. I have a customized jitsi-meet, so there no longer exists the dialog for inputing the password. Surely the code as in your quote won’t find any “lockKey” field to inject the password.
Using pure jitsi-meet JS API as in lib-jitsi-meet/API.md at master · jitsi/lib-jitsi-meet · GitHub, I can join my media server by calling JitsiConference::join(“explicit password”). I wonder whether I can call this JS API function in the java enviroment (in the jitsi-meet-torture) ?.
You may ask me why I still need joining a protected conference with Java / selenium (jitsi-meet-torture) while already succeeding doing the same with JS API. Simply I need Fake camera feature for participant which is available in Java/Selenium but not with JS API.
Briefly, please help me either of the following:
-Guide to use fake camera / mic with Meet-jitsi-JS API
-Or guide to join a protected conference in jitsi-meet-torture in the manner of JS API, namely JitsiConference::join(“explicit password”).
Many thanks in advance for your time and helps

You can find examples in the code how to execute js script on the loaded page, that js is anything you can use in the js console.