Automated login via Delphi?

Hello, not sure if anyone can help me with this. I have a login screen:


I would like to automate login on this Ember form above using an embedded browser via Delphi. I can execute JS directly at will.

I can set the user and pw simply enough, but need to trigger the [Sign In] button. Is there a JS function I can call to do that?

I’m not familiar enough with Delphi to know what all it supports but if it supports standard javascript DOM APIs (e.g. document) you can just grab the button element and click it.

For example in a regular ol’ browser you could do something like:

const button = document.querySelect('button'); // you probably want to be more specific than "button";

And just to throw this out there… and prefacing this with the fact that I have no idea what the context is or how authentication on both your backend and frontend is working, but you could also do something like make an auth request in the background and get a token of some sort and plop it in the right place (e.g. local storage, or the Delphi equivalent), thus skipping this screen entirely. But again I don’t really know what I’m talking about there.