Jump to content

Recommended Posts

Posted

So I have an absolutely huge script which goes through a web page then inputs data, checks the data and then proceeds through multiple screens 

It seems to get stuck midway through the script with this output on the console 

 

Test 9 Test Failed:There is any other situation which can present a higher risk of money laundering or terrorist financing (e.g. client's country of residence, circumstances of the particular transaction etc)  Ensure money laundering and terrorism line is displayed        doesn't match the following value retrieved 
Starting for loop for 2nd next button on Due Digilgence Assesement Screen
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)

Here is where the script gets (as the last console input from console write is the "Starting For loop for 2nd next button on Due Diligence Screen

 

 

Sleep(4000)
;below function in Generic Fucntions
ConsoleWrite("Starting for loop for 2nd next button on Due Digilgence Assesement Screen" & @CRLF)
$oButtons = _IETagNameGetCollection($oIE, "input")
Sleep(4000)
If IsObj($oButtons) Then
    For $oButton In $oButtons
        If $oButton.getAttribute("value") = "Save and Next" Then
            MsgBox(64, ' Button Found', 'Button found with value: ' & $oButton.getAttribute("value"), 2)
            _IEAction($oButton, 'click')

            ExitLoop
        EndIf
    Next
EndIf
 ;/****************************End ***********************************************************/


 ;/****************************Identity evidence uploads*****************************************/
Sleep(8000)
_IELoadWait($oIE)
Sleep(8000)

 ;Upload identity documents
 $FileUpload1 = _IEGetObjById($oIE, "ClientFileOne_Evidence")
 ;Click browse button to open Windows explorer file select windoe
_IEAction($FileUpload1, "click")
If @error Then
   ConsoleWrite("Can't click Client file evidence Browse button" & @CRLF)
Else
   WriteToConsoleAndLog("No error clicking File upload button for ClientFileOne_Evidence ID")

EndIf
Sleep(8000)

;Focus Window explorer window
$FileLocation = "H:\Quality Assurance\Test Data\Spreadsheet uploader - Ebilling.docx"
Local $Window_fileUpload = WinWait("[CLASS:#32770]", "", 10)

; Activate window and send location of document
WinActivate($Window_fileUpload)
Sleep(4000)
Send($FileLocation)
Sleep(4000)
Send("{Enter}")
Sleep(4000)
;If @error Then

And the last screen it gets to after clicking the Browse button (for a file) in IE is opening the Browser window. 

However it doesnt' send the file location, click enter or even continue the rest of the script which goes on for quite a bit. 

So how can I tackle the errors showing in the console? 

Posted

please paste all script , is much better , or runned script

and use after _iecommand

_IELoadWait($oIE, $iGTimeToCeck, $iGTimeOut)

is much better  (usally) then sleep

 

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
×
×
  • Create New...