Page 1 of 1

Account information auto filled in

Posted: Thu Jun 30, 2022 10:43 am
by cooperf01
Is there a way to fill in the information needed for login to a specific web page automatically so all the have to do is click log in.
2022_06_30_12_39_57_Clipboard.png
2022_06_30_12_39_57_Clipboard.png (11.75 KiB) Viewed 12590 times

Re: Account information auto filled in

Posted: Fri Jul 01, 2022 8:44 am
by Scott
See this topic in the forums "PWB CEF Autologin to a Site":

viewtopic.php?f=8&t=3652

--Scott

Re: Account information auto filled in

Posted: Tue Jul 05, 2022 7:14 am
by cooperf01
I have tried that but it does not seem to work. This is the URL for the site https://seminolestate.campus.eab.com/se ... irect=true and I added the signinfilter.txt to the end but it does not work.

Re: Account information auto filled in

Posted: Tue Jul 05, 2022 10:15 am
by Scott
If the following values are not present, add them to your INI file.

Code: Select all

[Files]
JavaScriptFilterFile=signinfilter.txt

[Security]
CheckJavaScriptAccess=True
In the filter file (signinfilter.txt):

Code: Select all

-all
+^https://seminolestate.campus.eab.com/session/new	signinjavascript.txt
In the JavaScript file (signinjavascript.txt):

Code: Select all

document.getElementById('login').value='john';
document.getElementById('password').value='letmein';
document.getElementsByName('commit')[0].click();
The filter file has PWB analyze each URL, specifically for one that starts with "https://seminolestate.campus.eab.com/session/new", and when it matches inject the JavaScript from the "signinjavascript.txt" file.

This will fill in the "login" element with "john" and the "password" element with "letmein" and then click the "commit" element.
javascript_example.PNG
javascript_example.PNG (54.26 KiB) Viewed 12569 times
Notice we had to use the get element by name in the second command as the "commit" element does not have an ID.

--Scott

Re: Account information auto filled in

Posted: Tue Jul 05, 2022 10:16 am
by Scott
Here are the files we tested with.

--Scott

Re: Account information auto filled in

Posted: Tue Jul 05, 2022 12:06 pm
by cooperf01
Thank you.