Jump to content

Can't able to auto login into web page


Recommended Posts

Hi All,

Right now i am trying to login into particular web page using AutoIT. But it seems my code for login fails.Please someone here help me to figure out the problem. I have attach the source for that web site. My code is something like

#include <IE.au3>
$oIE = _IECreate("http://www.xyz.com/Login.html")
$oForm = _IEFormGetObjByName ($oIE, "Login")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "Admin")
_IEFormSubmit ($oForm)

Thanks in advance

Login.html

Edited by Mecrazycoder

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

_IEFormSubmit ($oForm, 0)
_IELoadWait($oIE)

Thanks for the reply. But actually it is not the problem. I cant even able to read the HTML using AutoIT. Since that web page is making use of Yahoo UI, will it be the problem?

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

And what about the password field, don't you need to supply this info too? What the problem is? Page not responding? Script not responding? Can't login?

Actuallyn we need to supply password. That is my sample script.Problem was can't able to enter into any of the fields. Moreover i cant able to read the html content using autoit function

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

What is the site you try to login to?

Actually its an web application that we developed. I am trying to do automated testing using AutoIT.

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

This works for me:

include <IE.au3>
$oIE = _IECreate("c:\Login.html")
$oForm = _IEFormGetObjByName ($oIE, "Login")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "Admin")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "Admin2")
;_IEFormSubmit ($oForm)
Link to comment
Share on other sites

This works for me:

include <IE.au3>
$oIE = _IECreate("c:\Login.html")
$oForm = _IEFormGetObjByName ($oIE, "Login")
$oQuery = _IEFormElementGetObjByName ($oForm, "username")
_IEFormElementSetValue ($oQuery, "Admin")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "Admin2")
;_IEFormSubmit ($oForm)

Thanks. But its not working for me.

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

What is your OS , IE , Autioit versions?

Check out the IE settings and security options.

I don't think OS,IE,AutoIT versions are the problems because i can automate any web sites other than this one. Only thing that striking me is server. I am using Oracle web logic server.

[size="4"][font="Arial Narrow"][font="Garamond"]Attitude is a little thing that makes a big difference[/font][/font][/size][indent][/indent]

Link to comment
Share on other sites

I have a similar problem - it works using the _IEFormGetObjByName() and _IEFormElementSetValue() on most webpages , but certain javascript pages with frames and/or tables it doesn't work at all. There must be other functions within IE.au3 that enable you to do this

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...