I am attaching a screen shot of the prompt box which is the usual, open, save, saveas popup. This code extract grabs the body text, finds the monthly statement name (red box in picture) then builds the url to pull the last statement. This all works great but I added it to let you see what happens before I execute it (IENavigate>%IE[0]%,%StatementURL%,ie_res) as the next popup (shown in picture) stops the script.
Using MessageModal>Hello just to see if I can get it to do anything after that command, but it does not show the message.
I have tried setting focus to Internet Explorer*, waiting for window to open etc., but actually nothing works, I can't even end the script until I kill the popup. If I interact with it the script runs again. Anyone seen this before as I am really out of ideas after 2 days? Thanks!
Using: Win 8.1, IE 11 and MS 14
Code here:
Code: Select all
//Export last statement as a CSV
//Grab the txt from the screen to get the last statement date and use it to build the url
//Use TAG extract to get the value
IEExtractTag>%IE[0]%,,BODY,0,0,GrabBodyText,ie_res
Separate>GrabBodyText,%CRLF%,BodyText
//The line I am looking for is in BodyText_230 and is eg. "Statement for 13 Jan 15"
//Now to find the Date,Month,Year
Separate>BodyText_230, ,StatementInfo
Let>SDay=StatementInfo_3
Let>SMonth=StatementInfo_4
Let>SYear=StatementInfo_5
//Fake up the URL
//https://bcol.barclaycard.co.uk/ecom/as2/export.do?doAction=processExportStatementTransaction&type=CSV&state=ST&statementDate=13 Jan 15&sortBy=transactionDate&sortType=Dsc
Let>StatementURL=https://bcol.barclaycard.co.uk/ecom/as2/export.do?doAction=processExportStatementTransaction&type=CSV&state=ST&statementDate=
Concat>StatementURL,SDay
Concat>StatementURL,
Concat>StatementURL,SMonth
Concat>StatementURL,
Concat>StatementURL,SYear
Concat>StatementURL,&sortBy=transactionDate&sortType=Dsc
//Pull up the right URL for last months statement
IENavigate>%IE[0]%,%StatementURL%,ie_res
//Wait>5 tried this earlier but makes no difference as the csv save box pops up immediately
messagemodal>Hello
//Setfocus>Internet Explorer*
//Let>WF_TYPE=2
//WaitWindowOpen>Internet Explorer*
SetFocus>Internet Explorer*
//Save the CSV
Press Down * 2
Press Enter
Let>WF_TYPE=2
WaitWindowOpen>Save As
SetFocus>Save As
SendText>%filepath1%
Press Enter
**BREAKPOINT**