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 18206 times

Scott
Site Admin
Site Admin
Posts: 2531
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: 2531
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 18185 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: 2531
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 1117 times
signinfilter.txt
(79 Bytes) Downloaded 1101 times
PWB.INI
(6.57 KiB) Downloaded 1082 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.

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

Re: Account information auto filled in

Post by Scott »

For those wanting to suppress the "Manage Cookie Preferences" when using the III Vega catalog and the PWB Clear Cache on Close, attached are the filter files to do it.

Image
managecookiescript.txt
(175 Bytes) Downloaded 76 times
managecookiefilter.txt
(65 Bytes) Downloaded 78 times

Post Reply