Jump to content
Sign in to follow this  

Help in clicking IE Object

Recommended Posts


<form name="topaz" id="topaz" method="post" action="detail.do" onsubmit="enableAll();return verify(this,true);">
<div style="float:left;">
<a tabindex="1" href="javascript:setSelected(arr_X5,'X72_p');" class="notebookTab" id="X72_t" scripttype="nbtab" nbparent="X5" title="Change" style="">Change </a>


#include <IE.au3>

_IEErrorHandlerRegister ()
$oIE = _IECreate ("XXXX", 0)
$oForm = _IEFormGetObjByName ($oIE, "Login")
$oQueryUser = _IEFormElementGetObjByName ($oForm, "USER")
_IEFormElementSetValue ($oQueryUser, "XXX")
$oQueryPass = _IEFormElementGetObjByName ($oForm, "PASSWORD")
_IEFormElementSetValue ($oQueryPass, "XXX")

$oInputs = _IETagNameGetCollection($oIE, "input")
For $oInput In $oInputs
    If (($oInput.form.name == "Login") AND ($oInput.type == "image")) Then
        $hwnd = _IEPropertyGet($oIE, "hwnd")
        _IEAction ($oInput, "focus")
        ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}")
Sleep(6000) ;<= Sleep for 1 mins

Here i am able to login to the given site, next step i need is to click to "Change", there am not able to do it, I have updated HTML code.

Share this post

Link to post
Share on other sites

Did you install IE9? If yes, there is a bug in AutoIt currently so that for example clicking or setting focus in IE9 doesn't work. But it works in IE8.

Share this post

Link to post
Share on other sites

Didn't try the OP code, but setting compatibility mode in IE9 makes a work-around the issue above. The problem has been identified (related to new ObjName() function) and will be fixed in an upcoming Beta.

@pramodgn: You have _IEErrorHandlerRegister(), which is good. For future reference, run your script in SciTE and watch the console pane for helpful errors. If you end up posting the script for help, include the errors from that console pane in your post.


Edited by PsaltyDS

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...