IE Child window halts script

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
davedavydave
Newbie
Posts: 16
Joined: Mon Dec 01, 2008 3:56 pm

IE Child window halts script

Post by davedavydave » Wed Feb 11, 2015 10:03 am

Trying to automate the logon and extract of monthly bank statement. Everything has been building nicely but now I have an IE popup when successfully pulling up a URL that prompts what to do with a CSV download. It appears to halt the script. I can't even get the script to jump out at BREAKPOINT right after the URL command.

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!
CSV Popup.jpg
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**
Cheers,
Dave

Hill Running...... Beats work!

davedavydave
Newbie
Posts: 16
Joined: Mon Dec 01, 2008 3:56 pm

Re: IE Child window halts script

Post by davedavydave » Wed Feb 11, 2015 11:04 am

I'm going to try this previous solution from Marcus: viewtopic.php?f=2&t=7652&p=33715&hilit=IE+popup#p33715. Sounds like its the same problem I have. I never found this post in my many previous searches so pleased!
Cheers,
Dave

Hill Running...... Beats work!

davedavydave
Newbie
Posts: 16
Joined: Mon Dec 01, 2008 3:56 pm

Re: IE Child window halts script

Post by davedavydave » Wed Feb 11, 2015 6:08 pm

Ended up going away from the IETag way of doing things and resolved it my moving the page up and down and then using image recognition which worked very well.
Cheers,
Dave

Hill Running...... Beats work!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts