Hello, good evening
I ask for your help to solve the problem in my thesis that I created to log in automatically on a work absence website.
here I made a script based on JavaScript that is used in scritable applications on iOS 16.
This is the script that I made to create an automatic login on the work absence website in a scriptable app
let user = ‘ntest’;
let pass = ‘test’;let v = new WebView();
await v.loadURL(‘https://e-absensi.rsudrsoetomo.jatimprov.go.id/absensi/public/login’);let js = `let user = ‘${user}’;
let pass = ‘${pass}’;document.getElementById(‘nomorindukpegawai’).value = user;
document.getElementById(‘LoginForm_password’).value = pass;
document.getElementById(‘ap-claim’).value = user;
document.getElementById(‘ap-credential-autofill-hint’).value = user;
document.getElementById(‘ap-credential-autofill-hint’).dataset.claim = user;document.getElementById(‘login-button’).click();`;
v.present(); v.evaluateJavaScript(js);
await v.waitForLoad()v.present(); v.evaluateJavaScript(js);
await v.waitForLoad();const result = v.present(); v.evaluateJavaScript(js);
// use result in the Widget
in the script everything runs smoothly, but the script still can’t run the auto click command on the login button.
i use the command:
document. getElementById(‘login-button’).click();
the command does not run on the script that I made. give me a solution to complete the auto click command to make all run more perfect.
Thank You.
login page : https://e-absensi.rsudrsoetomo.jatimprov.go.id/absensi/public/login
home page after login : https://e-absensi.rsudrsoetomo.jatimprov.go.id/absensi/public/home