Jump to content
Sign in to follow this  
Ejaz

Web Browser login

Recommended Posts

Ejaz

I am looking to open a browser window after button executed. Immediately I have to fill userid and password in the window to login to the system

Any help

Jazz

Share this post


Link to post
Share on other sites
PsaltyDS

I am looking to open a browser window after button executed. Immediately I have to fill userid and password in the window to login to the system

Any help

Jazz

Try out the example scripts in the help file under the _IE* functions of the IE.au3 UDF.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Ejaz

Try out the example scripts in the help file under the _IE* functions of the IE.au3 UDF.

:D

I couldnt find passing user id and pass and clicking OK button

Share this post


Link to post
Share on other sites
PsaltyDS

I couldnt find passing user id and pass and clicking OK button

Then you didn't bother to read Example 3 under _IEFormElementSetValue(). Go back and finish your homework. No TV, games, or cell phone until your homework is done. And don't whine to your mother about it, she'll back me up!

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Ejaz

Then you didn't bother to read Example 3 under _IEFormElementSetValue(). Go back and finish your homework. No TV, games, or cell phone until your homework is done. And don't whine to your mother about it, she'll back me up!

:D

alrite no tv games n other stuff, n mom backs u up !!! good work for shakin me up.

Now come to the point

Login work for hotmail, why it isnt working for "http://mail.yahoo.com" Bear with me as mm new to this

#include <IE.au3>

; Create a browser window and navigate to hotmail

$oIE = _IECreate ("http://www.hotmail.com")

; get pointers to the login form and username, password and signin fields

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

$username = "xyz"

$password = "abc"

; Set field values and submit the form

_IEFormElementSetValue ($o_login, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_signin, "click")

Share this post


Link to post
Share on other sites
Authenticity

I have a naive thinking but did you actually thought that changing the URL will work for you?

Yahoo! is using different names for the form, the inputs, etc..

Download DebugBar to get these elements names or IDs or do it the long way and read the source if you'd like to.

Share this post


Link to post
Share on other sites
rajeshontheweb
Ejaz

Yup offcourse i tried this with yahoo url, sorry for leavin hotmail in the example earlier

[code ]
#include <IE.au3>
; Create a browser window and navigate to hotmail
$oIE = _IECreate ("http://mail.yahoo.com")

; get pointers to the login form and username, password and signin fields
$o_form = _IEFormGetObjByName ($oIE, "f1")
$o_login = _IEFormElementGetObjByName ($o_form, "login")
$o_password = _IEFormElementGetObjByName ($o_form, "passwd")
$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

$username = "xyz"
$password = "abc"

; Set field values and submit the form
_IEFormElementSetValue ($o_login, $username)
_IEFormElementSetValue ($o_password, $password)
_IEAction ($o_signin, "click")

Share this post


Link to post
Share on other sites
Ejaz

Ok , actually i dont want to login to yahoo with that but thanks for your advice using debugger.

What actually i want is to login in to equipment whose ip is "10.0.0.1"

After trying "10.0.0.1" in the broswer the dialog box appears for the user id and password to log in. This is not a form, and the dialog box require user id and pass and OK or Cancle button.

I hope it is clear.

Any help !!

Share this post


Link to post
Share on other sites
MrMitchell

Do you have the AutoIt Window Info Tool? That would probably help as well.

Look up WinActivate, WinWaitActive, WinActive, ControlSend, Control Click. See what they do and how they could work for you. If the title of the pop-up window is something like "Connect to ......" then you could use something like WinActivate("Connect to") or WinWaitActive("Connect to").

To input the username/password, you would use the Window Info Tool to grab the name of the input controls, usually it's like Edit1,Edit2,Edit3,... then you could use ControlSend("Connect to", "", "Edit1", "username") to input into the edit boxes.

To click OK: ControlClick("Connect to", "OK", "Button2")

Again you have to make sure all your control names are correct. And this is just one way you could go about it.

Good Luck :D

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  

×