Mecrazycoder Posted October 23, 2009 Share Posted October 23, 2009 (edited) 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 advanceLogin.html Edited October 23, 2009 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 More sharing options...
Authenticity Posted October 23, 2009 Share Posted October 23, 2009 _IEFormSubmit ($oForm, 0) _IELoadWait($oIE) Link to comment Share on other sites More sharing options...
Mecrazycoder Posted October 23, 2009 Author Share Posted October 23, 2009 _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 More sharing options...
Authenticity Posted October 23, 2009 Share Posted October 23, 2009 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? Link to comment Share on other sites More sharing options...
Mecrazycoder Posted October 23, 2009 Author Share Posted October 23, 2009 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 More sharing options...
Juvigy Posted October 23, 2009 Share Posted October 23, 2009 What is the site you try to login to? Link to comment Share on other sites More sharing options...
Mecrazycoder Posted October 23, 2009 Author Share Posted October 23, 2009 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 More sharing options...
Juvigy Posted October 23, 2009 Share Posted October 23, 2009 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 More sharing options...
Mecrazycoder Posted October 23, 2009 Author Share Posted October 23, 2009 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 More sharing options...
Juvigy Posted October 23, 2009 Share Posted October 23, 2009 What is your OS , IE , Autioit versions? Check out the IE settings and security options. Link to comment Share on other sites More sharing options...
Mecrazycoder Posted October 23, 2009 Author Share Posted October 23, 2009 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 More sharing options...
Juvigy Posted October 23, 2009 Share Posted October 23, 2009 You have attached one html file. Is it working with it when you save it on C drive as i have? Link to comment Share on other sites More sharing options...
darcaro Posted October 23, 2009 Share Posted October 23, 2009 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 More sharing options...
Juvigy Posted October 26, 2009 Share Posted October 26, 2009 Install "debugbar" or other similar software to help you in IE automation. Link to comment Share on other sites More sharing options...
Mecrazycoder Posted October 26, 2009 Author Share Posted October 26, 2009 Install "debugbar" or other similar software to help you in IE automation.Let me check.....Tanx [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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now