How to execute a JS command in Senhasegura PAM

Hello everyone,

I’m trying to figure out how to run a JavaScript command in Senhasegura PAM to automatically insert a value into a text field on a login page.

For testing purposes only (not the actual use case I need), I tried the following command and values:

Wait (MS): 1000
Action: Run JS command
Field: (empty)
Value: document.querySelector(‘input[name=“j_username”]’).value = “myTest”;
Attempts: 3
Interval (MS): 1000

This should be straightforward, and I could normally accomplish the same with the standard [Field] and [Value] options. However, when I try to apply it inside Senhasegura PAM, nothing happens.

Has anyone here successfully executed JavaScript commands in Senhasegura to interact with web login fields?
Am I missing a specific step, syntax, or execution context that Senhasegura requires?

Any guidance, tips, or working examples would be greatly appreciated.
Thank you all

Hello Mustafa,

Yes, running custom JavaScript commands can work within Segura — however, it greatly depends on how the login page is built and how its elements behave.

We recommend opening a support ticket so our team can analyze your specific scenario and provide tailored guidance to help you get it working properly.

Platform: https://support.senhasegura.com/

Let us know if you need any further support!

Best regards.