Page 1 of 1

Login

Posted: Wed Apr 04, 2018 8:18 am
by webmaster
This action takes a username and password and logs you in on most login pages. If no login fields are found, it will assume you're already logged in and continue the extraction. To use this on your project, follow these instructions.

Code: Select all

function (username password)
   Sequence.FirstOrDefault
      ·  Browser.EvalScript
            ·  "try{var t=document.querySelector('input[type=password]').form.querySelector('input[type=\"text\"],input[type=\"email\"]');if(!t)throw 0;return[t]}catch(t){return[]}"
            ·  0
         Browser.EnterText
            ·  username
         SelectBy.Css
            ·  "input[type=password]"
         Browser.SubmitText
            ·  password
         Browser.Wait
            ·  1000
   State.RememberURL
Use it as in the following example (this example assumes it's been already pasted under the name Login)

Code: Select all

Login
   ·  "username"
   ·  "password"