Sign in to follow this  
Followers 0
Smackdog

Automating login from browser prompt

4 posts in this topic

I've been looking into using the IE.au3 features to do some web page automation. I've seen how to auto populate a lot of form fields including usernames and passwords.

What I haven't been able to sort out is how to automate login to a website when the credentials are prompted from the browser. I've been using DebugBar to try to sort out what's what but that doesn't seem to help me for the browser prompt.

Any ideas?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

credentials are prompted from the browser

I'm not sure quite what you mean. Can you post the website URL?

Edited by JadeGolem

Share this post


Link to post
Share on other sites

This should get you started in the right direction...

#include <IE.au3>

;Title: Automate Webpage Form
;By:    lordicast
;Modified by: jfcby
;URL:   http://www.autoitscript.com/forum/index.php?showtopic=115891&st=0&p=809190&hl=googlelogin&fromsearch=1&#entry809190

$user = "MyUserName"    ;<<< Change username
$pass = "MyPassWord"        ;<<< Change password
$url = "https://www.google.com/accounts/Login?hl=en&continue=http://www.google.com/" ;<<< Change webpage link
$oIE = _IECreate ($url)
_IELoadWait ($oIE)

$uForm = _IEFormGetObjByName ($oIE, "gaia_loginform")   ;<<< Change to form html name on webpage
$uText = _IEFormElementGetObjByName ($uForm, "Email")   ;<<< Change to input name of username field box within form on webpage
_IEFormElementSetValue ($uText,$user)

$pText = _IEFormElementGetObjByName ($uForm, "Passwd")  ;<<<Change to input name of password field box within form on webpage
_IEFormElementSetValue ($pText,$pass)
_IEFormSubmit ($uForm)

jfcby


Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Share this post


Link to post
Share on other sites

I'm not sure quite what you mean. Can you post the website URL?

It's an internal sharepoint site, so I can't post the URL. But it's just that standard prompt from the browser in a pop-out window, not a form on a login site. Where just browsing to the URL pops up the prompt for credentials.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0