ONDOWNLOAD wont work in Imacros browser

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
senor pengwin
Posts: 32
Joined: Thu Aug 17, 2017 10:33 pm

ONDOWNLOAD wont work in Imacros browser

Post by senor pengwin » Tue Aug 07, 2018 5:31 pm

Hello I am using:
VERSION BUILD=12.0.501.6698
IMacros Browser
Windows 7 64 Bit

Unfortunately I cannot provide website information because it is for a bank but basically I have a simple iMacros that goes into the website exports a report.

Here is the code:

Code: Select all

VERSION BUILD=12.0.501.6698
TAB T=1
TAB CLOSEALLOTHERS
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:username CONTENT=*
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:password CONTENT=*
TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=TXT:ProcessingLog<SP>in
TAG POS=1 TYPE=DT ATTR=TXT:COMMERCIAL
TAG POS=1 TYPE=A ATTR=TXT:Download

TAG POS=1 TYPE=SELECT ATTR=ID:dateRange CONTENT=%CustomDateRange
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:startDate CONTENT=8/1/2018
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:endDate CONTENT=8/6/2018
TAG POS=1 TYPE=SELECT ATTR=ID:DownloadFormat CONTENT=%CSV

ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=TXT:ProcessingDownload<SP>transactions
WAIT SECONDS=4
Now here is the issue. When I run this through the iMacros browser, it should download a csv but instead it exports a file with the file type of “File" and when I open it up in notepad I get a bunch of HTML. Not the html info for the data I need but just some random information shown below.

Code: Select all

<!DOCTYPE html>
<html lang="en-us">
<!--This software (including any images, applets, photographs, animations, video, music and text incorporated into the software)...(Other Junk).-->
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="noindex">
    <title>Error</title>
    <meta http-equiv="expires" content="Tue, 04 Dec 1993 21:29:02 GMT" />
    <meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate" />
    <meta http-equiv="pragma" content="no-cache" />
    <link href="/PBI_PBI1151/css/opensource?v=gs21KAPQlB8C94HICCHy1ZIeBPIPc4uDB2kAYrXV1y01" rel="stylesheet"/>
<link href="/PBI_PBI1151/css/static?v=xFYQ-uHRiKBIIqHctoUVlMMHlq7RwM28-l-hhJaknk81" rel="stylesheet"/>

</head>
<body>
    <svg class="is--hidden">
        <defs>
            <path id="shape--exclamation-circle" d="M 1.25 8 C 1.25 4....(More Junk)" />
        </defs>
    </svg>
    <div class="wrapper">
        <div class="alert alert--error">
            <p><svg viewBox="0 0 16 16" class="icon shape--exclamation-circle"><title>Error</title><use xlink:href="#shape--exclamation-circle"></use></svg> For security reasons, your session has ended. Log in again.</p>
        </div>
    </div>
</body>
</html>
-To start I should mention that if I run this through iMacros for Internet Explorer it runs and saves the file perfectly.

-I have played around with the folder and file location and names but does not change anything. I get the same "File".

-If I do the whole proces manually in the iMacros browser, I can sucessfully down the file, which would make me think it's just not "catching" the file, but I wait for it and it does "catch" a file, just not the right one.


Is this just a bug in the iMacros browser? This iMacros is being activated by a VBA in Excel, if there is no workaround is there anyways to activate an iMacros in VBA that will launch it through Internet Explorer? Kind of like they have for FireFox?

Code: Select all

 Set iim1 = CreateObject("imacros")
  iret = iim1.iimInit ("-fx")

Thanks
senor pengwin
Posts: 32
Joined: Thu Aug 17, 2017 10:33 pm

Re: ONDOWNLOAD wont work in Imacros browser

Post by senor pengwin » Wed Aug 08, 2018 3:03 am

Well that's silly of me, it wasn't in the Wiki page but to open an instance of iMacros in Internet Explorer from VBA you just use:

Code: Select all

 Set iim1 = CreateObject("imacros")
  iret = iim1.iimInit ("-ie")
Not sure why it wouldn't work in iMacors browser but this will work.
Post Reply