Sign in to follow this  
Followers 0
gsb678

The requested action with this object has failed for IE script

4 posts in this topic

Hi all,

I'm entirely new to AutoIt and started automating the web site called as GMO web post

It displays total 5 screen one after another after successful submission of data in every page.

I could proceed till 5th screen but suddenly in teh 5th screen it is displaying some error while executing.

The error displayed is shown below.

C:\Program Files\AutoIt3\Include\IE.au3 (1169) : ==> The requested action with this object has failed.:

If IsObj($o_object.document.forms.item ($s_Name, $i_index)) Then

If IsObj($o_object.document.forms.item ($s_Name, $i_index)^ ERROR

>Exit code: 1 Time: 15.097

Can any one help in solving what is the problem and how to solve it.

Early response will be appreciated.

script what i've executed is attached for your reference.

Share this post


Link to post
Share on other sites



If you add

_IEErrorHandleRegister()
at the beginning of the script, you can see whats actually causing this

This was the error

--> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.3-1 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType

The Form name was incorrect, that makes the variable you refer to is an InvalidObjectType, next up which it could not proceed the Click

Hope it helped.

Share this post


Link to post
Share on other sites

If you add

_IEErrorHandleRegister()
at the beginning of the script, you can see whats actually causing this

This was the error

--> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.3-1 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType
--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType

The Form name was incorrect, that makes the variable you refer to is an InvalidObjectType, next up which it could not proceed the Click

Hope it helped.

Hi Thanx for immediate reply.

I've added _IEErrorHandleRegister() and observed the error u've specified.

But the form name i've entered correctly only what ever it is given in the HTML source.

The same method i've followd for all other screens and it worked well.

But only for the last screen there is some problem.

If u don't mind can u go through the last three lines which are giving error in the attached script.

script.txt

Share this post


Link to post
Share on other sites

Worked for me :)

#include <IE.au3>
_IEErrorHandlerRegister()
$oIE = _IECreate ("http://demo.borland.com/gmopost/")
$form1=_IEFormGetObjByName($oIE,"myForm")
$entergmoonline=_IEFormElementGetObjByName($form1,"bsubmit")
_IEAction($entergmoonline,"click")
_IELoadWait($oIE)
$form2=_IEFormGetObjByName($oIE,"Items")
$orderquantity=_IEFormElementGetObjByName($form2,"QTY_TENTS")
$quantity="2"
_IEFormElementSetValue($orderquantity,$quantity)
$placeanorder=_IEFormElementGetObjByName($form2,"bSubmit")
_IEAction($placeanorder,"click")
_IELoadWait($oIE)
$form3=_IEFormGetObjByName($oIE,"Info")
$proceedwithorder=_IEFormElementGetObjByName($form3,"bSubmit")
_IEAction($proceedwithorder,"click")
_IELoadWait($oIE)
$form4=_IEFormGetObjByName($oIE,"Info")
$billtoname=_IEFormElementGetObjByName($form4,"billName")
$billtoaddress=_IEFormElementGetObjByName($form4,"billAddress")
$billtocity=_IEFormElementGetObjByName($form4,"billCity")
$billtostate=_IEFormElementGetObjByName($form4,"billState")
$billtozip=_IEFormElementGetObjByName($form4,"billZipCode")
$billtophone=_IEFormElementGetObjByName($form4,"billPhone")
$billtoemail=_IEFormElementGetObjByName($form4,"billEmail")
$creditcard=_IEFormElementGetObjByName($form4,"CardType")
$cardnumber=_IEFormElementGetObjByName($form4,"CardNumber")
$expiration=_IEFormElementGetObjByName($form4,"CardDate")
$placetheorder=_IEFormElementGetObjByName($form4,"bSubmit")
$billname="fname"
$billaddress="134"
$billcity="Bangalore"
$billstate="Karnataka"
$billzip="95121"
$billphone="9999999999"
$billemail="test_31820071@yahoo.com"
$ccnumber="1234567812345678"
$expdate="12/07"
_IEFormElementSetValue($billtoname,$billname)
_IEFormElementSetValue($billtoaddress,$billaddress)
_IEFormElementSetValue($billtocity,$billcity)
_IEFormElementSetValue($billtostate,$billstate)
_IEFormElementSetValue($billtozip,$billzip)
_IEFormElementSetValue($billtophone,$billphone)
_IEFormElementSetValue($billtoemail,$billemail)
_IEFormElementOptionselect($creditcard,"MasterCard",1,"byText")
_IEFormElementSetValue($cardnumber,$ccnumber)
_IEFormElementSetValue($expiration,$expdate)
_IEFormElementCheckBoxSelect($form4,"OFF","shipSameAsBill",1,"byValue")
_IEAction($placetheorder,"click")
_IELoadWait($oIE)
$returntohomepage=_IEGetObjByName($oIE,"bSubmit")
_IEAction($returntohomepage,"click")
_IELoadWait($oIE)

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  
Followers 0