Account information auto filled in

Questions and comments about currently under development PWB v3

Moderators: Tyler, Scott

Post Reply
cooperf01
Participant
Participant
Posts: 15
Joined: Fri May 22, 2015 9:41 am

Account information auto filled in

Post 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 12314 times

Scott
Site Admin
Site Admin
Posts: 2527
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: Account information auto filled in

Post by Scott »

See this topic in the forums "PWB CEF Autologin to a Site":

viewtopic.php?f=8&t=3652

--Scott

cooperf01
Participant
Participant
Posts: 15
Joined: Fri May 22, 2015 9:41 am

Re: Account information auto filled in

Post 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.

Scott
Site Admin
Site Admin
Posts: 2527
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: Account information auto filled in

Post 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 12293 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

Scott
Site Admin
Site Admin
Posts: 2527
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Re: Account information auto filled in

Post by Scott »

Here are the files we tested with.

--Scott
Attachments
signinjavascript.txt
(153 Bytes) Downloaded 685 times
signinfilter.txt
(79 Bytes) Downloaded 696 times
PWB.INI
(6.57 KiB) Downloaded 674 times

cooperf01
Participant
Participant
Posts: 15
Joined: Fri May 22, 2015 9:41 am

Re: Account information auto filled in

Post by cooperf01 »

Thank you.

Post Reply