Download PDF Error -1415 Cannot find dowloaded file

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Download PDF Error -1415 Cannot find dowloaded file

by Adjustments on Fri Dec 08, 2017 11:59 am

This is my first time using this forum so I apologize if my formatting is not correct.

1.) iMacros Version = 12.0.501.6698
2.)Windows 10
3.)iMacros BrowserEmulating IE 11
4.)The Demo Macro does work
6.)Unfortunately I cannot give the URL of the website

I am attempting to save a pdf while in the iMacros browser. When I attempt to download the pdf 2 things happen.
The first is that the pdf itself does download, but I also get the -1415 error code saying that iMacros cannot find the
downloaded file. I thought this was strange because, there is no -1415 in the list of error codes and the file had in
fact been downloaded. This error message would pop up during the Wait command So, I decided to tried using ERRORIGNORE,
but the error message still popped up and ended my code. Is there anyway that I can force iMacros to stop this erroneous
error message from popping up.

Here is the relavent sections of my code
Code: Select all
SET !ERRORIGNORE YES
'
'
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
'
'
TAG POS=1 TYPE=INPUT:BUTTON ATTR=ID:P26_SUBMIT
SAVEITEM
Wait Seconds = 3
Adjustments
 
Posts: 1
Joined: Fri Dec 08, 2017 11:29 am

Re: Download PDF Error -1415 Cannot find dowloaded file

by chivracq on Fri Dec 08, 2017 2:06 pm

Adjustments wrote:This is my first time using this forum so I apologize if my formatting is not correct.

Code: Select all
1.) iMacros Version = 12.0.501.6698
2.)Windows 10
3.)iMacros BrowserEmulating IE 11

4.)The Demo Macro does work
6.)Unfortunately I cannot give the URL of the website

I am attempting to save a pdf while in the iMacros browser. When I attempt to download the pdf 2 things happen.
The first is that the pdf itself does download, but I also get the -1415 error code saying that iMacros cannot find the
downloaded file. I thought this was strange because, there is no -1415 in the list of error codes and the file had in
fact been downloaded. This error message would pop up during the Wait command So, I decided to tried using ERRORIGNORE,
but the error message still popped up and ended my code. Is there anyway that I can force iMacros to stop this erroneous
error message from popping up.

Here is the relavent sections of my code
Code: Select all
SET !ERRORIGNORE YES
'
'
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
'
'
TAG POS=1 TYPE=INPUT:BUTTON ATTR=ID:P26_SUBMIT
SAVEITEM
Wait Seconds = 3

Formatting of your Post is perfect...!, and the Sub-Forum as well... :D

Hum..., try this one..., with and without '!ERRORIGNORE'...:
Code: Select all
SET !ERRORIGNORE YES
'
TAG POS=1 TYPE=INPUT:BUTTON ATTR=ID:P26_SUBMIT
WAIT SECONDS=3
ONDOWNLOAD FOLDER=* FILE=* WAIT=YES
SAVEITEM
WAIT SECONDS=3

'SAVEITEM' saves your '.PDF' from the Browser Cache, so the 'WAIT' Statement before the 'SAVEITEM' should allow a few Seconds for the '.PDF' to first get downloaded/generated by/for the Browser itself before your Script is "allowed" to get hold of it...

Hum..., I was going to tell you to try using iMacros for FF to see if you get the same "Behaviour", but 'SAVEITEM' as a Standalone Command is only supported on iMB/IE, so..., that's a stupid Idea, oops...! :oops:

But hum..., I understand that the 'ONDOWNLOAD' Command is for the 'SAVEITEM', and that's why I moved the 'ONDOWNLOAD' Line just before the 'SAVEITEM' Line... But if the 'Submit' Button triggers a Download Popup, then the Position of your 'ONDOWNLOAD' Statement was correct, but then both the 'TAG' on the Button and the 'SAVEITEM' need their own 'ONDOWNLOAD' Statement, but that might be a bit "Double", I guess you don't want to download the File twice...? :? But hum, if the '.PDF' does not get cached and displayed by the Browser, then 'SAVEITEM' cannot indeed find the cached '.PDF', and that would explain the RuntimeError that you get... :idea:
=> Which would then mean that your original Script was nearly correct, but that you don't need the 'SAVEITEM' Command...

Stg you could try as well is playing with the '!USE_DOWNLOADMANAGER' Setting to see if it makes a difference...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6872
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests

-->