Evaluate JS in Widget: Form-action on webpage

Hey Guys,
I want to retrieve information from a website where you have to login first.

I‘ve tested these lines before on computer and it worked Fine:

let js_performLogin = `
// document.getElementsByClassName("form-control")[0].value = "'${user}'";
// document.getElementsByClassName("form-control")[1].value = "'${pass}'";
document.getElementsByClassName("form-control")._n.value = "'${user}'";
document.getElementsByClassName("form-control")._p.value = "'${pass}'";

var res = await wv.evaluateJavaScript(js_performLogin); //does NOTHING

When I try to run this script it only prints out content of the login-page.
Do you know if it’s even possible to trigger form actions via scriptable?