Jump to content
Sign in to follow this  

Control Not returning back to script execution

Recommended Posts



First of all AutoIt is a wonderful automation aid... I am trying to automate a web application testing... I am almost done but stuck at the last page... The problem is that at the last page I click on a link which is as below...

"<A href="java script: confirmMsg('submitreturnmainmenu')" onfocus="if (this.children[0] != null) this.children[0].className='activeButton';window.defaultStatus='button submit and return to menu'" onblur="if (this.children[0]) this.children[0].className='';window.defaultStatus=''" onmouseover="window.status='button submit and return to menu';return true;"><IMG id="submit_and_return_to_menu_button" src="../../../images/button_submit_and_return_to_menu.gif" class="bodytext" align="middle" border="0"></A>"

after clicking it the script control seems to go back to a previous line of code as displayed in the trayicon option... although a resultant pop up of the click comes up... but since the execution has gone back to previous line... the script doesn't proceed on completing its action the dialog box.. My code is below

#include <IE.au3>




$oIE_Premium_Summ = _IEAttach ("Summary.jsp")

$oForm = _IEFormGetObjByName ($oIE_Premium_Summ, "formPremiumResults")

$oLinks = _IETagNameGetCollection($oForm,"A")

; The code to click on link below. I had actually tried IEImgClick also prior to this thinking that it had problem I changed to this method

For $oLink in $oLinks

$sLinkText = _IEPropertyGet($oLink, "outerHtml")

If StringInStr($sLinkText, "submit_and_view.gif") Then

_IEAction($oLink, "click")




WinWaitActive("Windows Internet Explorer")


Any help would be appreciated... :-)

Edited by jaysmile

Share this post

Link to post
Share on other sites

I got the solution.... After clicking on the link the browser side scripting was calling a confirm message through a JS file thus not allowing control to come back to code... I found the solution in the IEAction example....

First of all I need to give a Hats off!!! to the documentation team for such a marvellous help file... without this it wouldnt have been possible for a newbie like me who has experience 2 days in AutoIt to do such extensive coding...

Thanks a lot guys... I am cult follower of AutoIt now for sure!!!!!

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.