Sshahr Posted August 2, 2017 Posted August 2, 2017 Hi All Thanks in advance for looking into this and admitting this is my first ever coding attempt not only in Autoit but in any language. Please pardon my ignorance. Now to the issue, I am working on a Service Delivery system where I simply need to put in a service request number in a portal and click submit to go to the next page. There are a bunch of checkboxes in that page and some other information. Based on those information I would tick one or two check boxes and submit the form. There is no iframe. now I have used _IEFormElementCheckBoxSelect initially but got error exactly on the third iteration with service requests where, it cannot find the IE object. I tried using Sleep, _IEloadwait, Winwait, Winactivate etc no luck. So, I decided to use another method and here is the code snippet =================================================== $aServiceRequest = [req1, req2, req3, req4] (i run the loop on the above array) Select Case $aPM <>"" And $aPMDel =="" If $aAccessType = "<some test text>" Then WinActivate ("<portal>") Local $CARS = _IEAttach ("<portal>") Local $oForm1 = _IEFormGetObjByName($CARS, "thisform") Local $oQuery1 = _IEFormElementGetObjByName($oForm1, "grp") _IEFormElementSetValue($oQuery1, "43809") Local $oSetButton = _IEFormElementGetObjByName($oForm1, "btn_changeSG") _IEAction ($oSetButton, "click") _IELinkClickByText ($CARS, "<some text>") Local $PMIndex = _ArrayBinarySearch($carsPM, $aPM, 0) Local $aPMID = $carsPM [$PMIndex][1] If Not @error Then Local $CARSChild = _IEAttach("<portal title>") Local $oForm2 = _IEFormGetObjByName($CARSChild, "thisform") _IELoadWait ($oForm2) Local $oInputs = _IETagNameGetCollection($CARSChild, "input") For $oInput In $oInputs If $oInput.name = $aPMID Then MsgBox (0,0, "Match is made") _IEAction ($oInput, "click") ExitLoop EndIf Next . . EndSelect The first two run of the loop is fine and does everything but on the third run, it gives me the below error IE.au3 (1811) : ==> The requested action with this object has failed.: Return SetError($_IESTATUS_Success, $oTemp.GetElementsByTagName($sTagName).length, $oTemp.GetElementsByTagName($sTagName)) Return SetError($_IESTATUS_Success, $oTemp^ ERROR >Exit code: 1 Time: 108.4 Could I please get some help to understand this error and possibly an indication of what I am doing wrong? many thanks
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