I am working an an JavaFX Webbrowser that can autologin to some sites, i know how to set the data to username and password fields but how to i make it execute the login button click? This is what i got so far:
String email  =  "document.getElementsByName('email')[0].value='MY_EMAIL';";
            String pass =    "document.getElementsByName('pass')[0].value='MY_PASSWORD';";
            String login =   "";
            webEngine.executeScript(email);
            webEngine.executeScript(pass);
            webEngine.executeScript(login);
and this is the javascript code of the button it should click:
<label class="uiButton uiButtonConfirm" id="loginbutton" for="u_0_c"><input value="Aanmelden" tabindex="4" type="submit" id="u_0_c"></label>