Recent

Author Topic: fpCEF3 website automation  (Read 1884 times)

nana232

  • New Member
  • *
  • Posts: 40
fpCEF3 website automation
« on: February 22, 2019, 07:36:19 am »
I would like to access the account in the website automatically.
Just like fill username and password and then click OK.

Can fpCEF3 do it?
Is there any example?
Lazarus 1.8.4 Win10 32bit

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: fpCEF3 website automation
« Reply #1 on: February 22, 2019, 10:02:47 am »
you can likely embed username and password by adding ?login=myusers&password=mypassword to the url, so:
https://www.example.com?login=myusers&password=mypassword

Note that some characters need to be escaped, e.g. if the username is an email address you need to replace @ with %40 and so on.
There are some URLEncode and URLdecode functions for that.
Also try to avoid hadcoding it and do not use with http, only for https:
http is plain visible in traffic
https: everybody that can extract the url has access to your site.

A better way is to login automatically using certificates.

« Last Edit: February 22, 2019, 10:12:45 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

korba812

  • Sr. Member
  • ****
  • Posts: 394
Re: fpCEF3 website automation
« Reply #2 on: February 22, 2019, 02:32:52 pm »
you can likely embed username and password by adding ?login=myusers&password=mypassword to the url, so:
https://www.example.com?login=myusers&password=mypassword
It's a very bad idea. Most http servers save the request path in logs, so the logs will contain plain passwords (no matter if http or https). Fortunately, no website I know doing this.

I think that in this case you have to send (POST) form data with the appropriate fields.

nana232

  • New Member
  • *
  • Posts: 40
Re: fpCEF3 website automation
« Reply #3 on: February 24, 2019, 11:35:52 am »
Thanks for all comments.

Finally, I decide to use Python+Selelnium to handle it (by TProcess). It works.


Lazarus 1.8.4 Win10 32bit

 

TinyPortal © 2005-2018