iMacros FILEDELETE

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
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

iMacros FILEDELETE

Post by haitashe » Mon Feb 25, 2019 3:49 pm

Hello,

our team is testing the trial version of Enterprise latest version iMacros version, we are not using now extensions for FF or Chrome because it doesn't have the functionality which was on 8.9.7 for example.
We are using the iMacros browser which has a lot of useful functionality, so my question is about FILEDELETE function.

For example, we have to import file in the bank, all these things work correctly but when it comes to FILEDELETE, for example, FILEDELETE NAME=C:\Users\USERid\Desktop\file_name.xml and after this command gets executed the file from the Desktop doesn't disappear, even when I am trying to delete it myself it asks for Admin rights (which I have) and still do not delete file. The deletion works only after I close the browser or go to another URL page, then it's even automatically removed (because before the delete command was executed).

What kind of issue is this? Is it possible to fix? Because it's annoying to close the browser and log in again every time (we upload different files every few minutes).

Hope I explained correctly, let me know if you need more info.
Marcia, Tech Support
Posts: 1094
Joined: Thu Jan 29, 2009 1:10 pm

Re: iMacros FILEDELETE

Post by Marcia, Tech Support » Fri Mar 01, 2019 12:19 pm

Hi,

Most likely the file is still in use (by the browser, I suppose). Is the file being used in some way by the browser, or iMacros itself?
Regards,

Marcia
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

Re: iMacros FILEDELETE

Post by haitashe » Fri Mar 01, 2019 1:28 pm

Marcia, Tech Support wrote:
Fri Mar 01, 2019 12:19 pm
Hi,

Most likely the file is still in use (by the browser, I suppose). Is the file being used in some way by the browser, or iMacros itself?
Hi Marcia,

The file (.html file with payments information) is getting imported to the bank to sign after upload, the file is being already uploaded, and we can send payments, so it shouldn't be used anymore by the browser because the upload was over, BUT for some reason seems like iMacros browser is still holding in use the file and we only can delete it after we log out from the bank or close the iMacros browser. (I mean the file auto deletes after we close or log out because the command FILEDELETE was executed before)

Some other banks don't have this issue, but also some of them sometimes delete the file sometimes no, when doesn't delete we have to close the browser or log out from the bank.

We haven't had these issues with iMacros old extension 8.9.7 on Firefox 56.0.2, but having problems with iMacros browser which emulates IE browser.
Tom, Tech Support
Posts: 3522
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros FILEDELETE

Post by Tom, Tech Support » Mon Mar 04, 2019 12:52 pm

Hi,

I have reproduced the issue using both the iMacros browser and iMacros for IE. I tested it by attempting to upload a file as an attachment to a forum post here and then using FILEDELETE to delete the file, for example:

Code: Select all

TAG POS=1 TYPE=INPUT:FILE ATTR=ID:html5_* CONTENT=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png
WAIT SECONDS=5
FILEDELETE NAME=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png
I get the same behavior reported by the user. However, attempting to do the same steps manually in either browser does not result in the file remaining locked, so it is most likely an iMacros bug.

I have logged the issue for further investigation by the development team.
Regards,

Tom, iMacros Support
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

Re: iMacros FILEDELETE

Post by haitashe » Mon Mar 04, 2019 7:29 pm

Tom, Tech Support wrote:
Mon Mar 04, 2019 12:52 pm
Hi,

I have reproduced the issue using both the iMacros browser and iMacros for IE. I tested it by attempting to upload a file as an attachment to a forum post here and then using FILEDELETE to delete the file, for example:

Code: Select all

TAG POS=1 TYPE=INPUT:FILE ATTR=ID:html5_* CONTENT=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png
WAIT SECONDS=5
FILEDELETE NAME=C:\Users\admin\Documents\iMacros\DataSources\imacros-keyword-assertion-text.png
I get the same behavior reported by the user. However, attempting to do the same steps manually in either browser does not result in the file remaining locked, so it is most likely an iMacros bug.

I have logged the issue for further investigation by the development team.
This is a serious issue for us, which stops us from buying the product because one of the most important function doesn't work properly. this should be fixed as soon as possible.
Tom, Tech Support
Posts: 3522
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros FILEDELETE

Post by Tom, Tech Support » Mon Mar 04, 2019 9:03 pm

There's a couple of different ways to work around the issue for now. It's possible to delete the file once you navigate away from the upload page (or close the browser). So you can have the macro navigate to another page (even about:blank so it doesn't take any time) then delete the file, and then navigate back. Here's a modified version of the demo Upload macro that does exactly this and works just fine:

Code: Select all

VERSION BUILD=11.5.497.9113
TAB T=1
TAB CLOSEALLOTHERS
'The macro browses for a file from the system. Note, no actual upload is performed    
URL GOTO=http://demo.imacros.net/Automate/FileUploadDemo
TAG POS=1 TYPE=INPUT:FILE FORM=ID:demo ATTR=NAME:uploaded_file CONTENT="{{!FOLDER_DATASOURCES}}\\Address.csv"
'Display some information for the user
TAG POS=1 TYPE=TEXTAREA FORM=ID:demo ATTR=NAME:S1 CONTENT="Done! The filename is in the upload box.\nWe could now click on the \"SUBMIT\" button or continue to fill in the rest of the form." 
'
WAIT SECONDS=1
' Navigate to any other page to free up the lock on the file
URL GOTO=about:blank
' Now delete the file
FILEDELETE NAME="{{!FOLDER_DATASOURCES}}\\Address.csv"
' And navigate back to where we were before
BACK
Regards,

Tom, iMacros Support
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

Re: iMacros FILEDELETE

Post by haitashe » Tue Mar 05, 2019 10:39 am

Tom, Tech Support wrote:
Mon Mar 04, 2019 9:03 pm
There's a couple of different ways to work around the issue for now. It's possible to delete the file once you navigate away from the upload page (or close the browser). So you can have the macro navigate to another page (even about:blank so it doesn't take any time) then delete the file, and then navigate back. Here's a modified version of the demo Upload macro that does exactly this and works just fine:

Code: Select all

VERSION BUILD=11.5.497.9113
TAB T=1
TAB CLOSEALLOTHERS
'The macro browses for a file from the system. Note, no actual upload is performed    
URL GOTO=http://demo.imacros.net/Automate/FileUploadDemo
TAG POS=1 TYPE=INPUT:FILE FORM=ID:demo ATTR=NAME:uploaded_file CONTENT="{{!FOLDER_DATASOURCES}}\\Address.csv"
'Display some information for the user
TAG POS=1 TYPE=TEXTAREA FORM=ID:demo ATTR=NAME:S1 CONTENT="Done! The filename is in the upload box.\nWe could now click on the \"SUBMIT\" button or continue to fill in the rest of the form." 
'
WAIT SECONDS=1
' Navigate to any other page to free up the lock on the file
URL GOTO=about:blank
' Now delete the file
FILEDELETE NAME="{{!FOLDER_DATASOURCES}}\\Address.csv"
' And navigate back to where we were before
BACK
This thing doesn't work for us, because we can't just open a blank page in the bank as it creates unique ID and back function won't work. But I reproduced the same thing with a new tab

Code: Select all

TAB OPEN
TAB T=2
FILEDELETE NAME=C:\Users\USERNAME\Desktop\FILE.HTML
WAIT SECONDS=1
TAB CLOSE
WAIT SECONDS=1
other function to continue sending payments....
And this thing doesn't work. Also, the file can be deleted only (like before) after log out from the bank or close the iMacros browser, going to other pages doesn't delete the file.
Tom, Tech Support
Posts: 3522
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros FILEDELETE

Post by Tom, Tech Support » Tue Mar 05, 2019 12:03 pm

Navigating to a new page in a new tab will not work, because it is the page/tab where the upload occurs that the file is locked and it will not be unlocked until a different page is loaded in the original tab.

If using BACK specifically causes a problem for your bank site, you may be able to save the current URL, load a blank page, then navigate back to the previous page using URL GOTO:

Code: Select all

' Save the current URL
SET previousPage {{!URLCURRENT}}
' Navigate to any other page to free up the lock on the file
URL GOTO=about:blank
' Now delete the file
FILEDELETE NAME="{{!FOLDER_DATASOURCES}}\\Address.csv"
' And navigate back to where we were before
URL GOTO={{previousPage}}
May I also ask why you need to delete the file right away? What is the problem with waiting until you log out of the bank site before deleting the file? I am asking because I don't have enough information about your specific use case to be able to make additional suggestions.
Regards,

Tom, iMacros Support
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

Re: iMacros FILEDELETE

Post by haitashe » Tue Mar 05, 2019 2:06 pm

Tom, Tech Support wrote:
Tue Mar 05, 2019 12:03 pm
Navigating to a new page in a new tab will not work, because it is the page/tab where the upload occurs that the file is locked and it will not be unlocked until a different page is loaded in the original tab.

If using BACK specifically causes a problem for your bank site, you may be able to save the current URL, load a blank page, then navigate back to the previous page using URL GOTO:

Code: Select all

' Save the current URL
SET previousPage {{!URLCURRENT}}
' Navigate to any other page to free up the lock on the file
URL GOTO=about:blank
' Now delete the file
FILEDELETE NAME="{{!FOLDER_DATASOURCES}}\\Address.csv"
' And navigate back to where we were before
URL GOTO={{previousPage}}
May I also ask why you need to delete the file right away? What is the problem with waiting until you log out of the bank site before deleting the file? I am asking because I don't have enough information about your specific use case to be able to make additional suggestions.
I meant that BACK doesn't work because if we go anywhere else from uploading stage and later want to back, the bank auto logs out us (seems like security to not use any back while trying to process the payment).
Also, it's anyways doesn't work because after I perform the payment and load any other bank page in same tab the file doesn't get removed (still locked) and only after we close the browser or log out then the file gets removed.

We don't want to log out because we import bank files every few minutes and there is no point to log out every single time to log in that many times and waste the time, we have created a script to stay alive in the page without log out.
Tom, Tech Support
Posts: 3522
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros FILEDELETE

Post by Tom, Tech Support » Wed Mar 06, 2019 12:10 pm

haitashe wrote:
Tue Mar 05, 2019 2:06 pm
Also, it's anyways doesn't work because after I perform the payment and load any other bank page in same tab the file doesn't get removed (still locked) and only after we close the browser or log out then the file gets removed.
Okay, so there are a few different scenarios in which the lock is released, and it seems to be somewhat site-dependent:
  1. Navigate away from the upload page
  2. Log out of the site
  3. Close the browser
On our demo page, it is simply enough to load any other page in the browser. On your bank site, you have to either log out or close the browser. After uploading an attachment to a forum post here and attempting to delete the file, the lock was only released by closing the browser.
haitashe wrote:
Tue Mar 05, 2019 2:06 pm
We don't want to log out because we import bank files every few minutes and there is no point to log out every single time to log in that many times and waste the time, we have created a script to stay alive in the page without log out.
Are you running the macro indefinitely? Is there some point that you do log out of the site and/or close the browser, at which point wouldn't this then delete all of the files? Does the uploaded file have the same file name every time, or is each uploaded file a different file name?
Regards,

Tom, iMacros Support
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

Re: iMacros FILEDELETE

Post by haitashe » Wed Mar 06, 2019 10:33 pm

Tom, Tech Support wrote:
Wed Mar 06, 2019 12:10 pm
haitashe wrote:
Tue Mar 05, 2019 2:06 pm
Also, it's anyways doesn't work because after I perform the payment and load any other bank page in same tab the file doesn't get removed (still locked) and only after we close the browser or log out then the file gets removed.
Okay, so there are a few different scenarios in which the lock is released, and it seems to be somewhat site-dependent:
  1. Navigate away from the upload page
  2. Log out of the site
  3. Close the browser
On our demo page, it is simply enough to load any other page in the browser. On your bank site, you have to either log out or close the browser. After uploading an attachment to a forum post here and attempting to delete the file, the lock was only released by closing the browser.
haitashe wrote:
Tue Mar 05, 2019 2:06 pm
We don't want to log out because we import bank files every few minutes and there is no point to log out every single time to log in that many times and waste the time, we have created a script to stay alive in the page without log out.
Are you running the macro indefinitely? Is there some point that you do log out of the site and/or close the browser, at which point wouldn't this then delete all of the files? Does the uploaded file have the same file name every time, or is each uploaded file a different file name?
As I explained before, navigating away from the upload page doesn't work. Also, we don't use only the same bank, we use a lot of other banks with the same task as uploading the payment file. On some other banks the FILEDELETE sometimes works sometimes the file gets locked and solution to that is only logging out from the bank or close the browser, which is not good as we can do the same thing and without using iMacros extension.

Yes, we run macro indefinitely but not on all our bank's accounts, every new file only can have the same name, as the file gets generated from our payments gateway.
chivracq
Posts: 8696
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: iMacros FILEDELETE

Post by chivracq » Wed Mar 06, 2019 11:26 pm

My 2 cts...:
Why not use iMacros for FF v10.0.2 rather than the iMacros Browser then...? :o

If v8.9.7 for FF is/was not locking the File, then "chances" are that v10.0.2 for FF won't lock the File either, even if you would need to test that of course... :wink:

The 'PE' Version for v10.0.x for FF/CR is cheaper than iMB v12.x anyway, and for some "simple" 'File Upload' Functionality, you probably don't need all the extended Functionality (like the 'DS' Mode) from iMB...
(v10.0.5 for CR wouldn't be an Option as 'FILEDELETE' is not supported at all on CR.)

Another Option would be to use Pale Moon instead of plain FF, for which iMacros v8.9.7 for FF still works (on PM27 or PM28). And PM is much more reliable and stable than FF anyway... :idea:

EDIT:
Arrrggghhh...!! "File upload is not supported...!" in v10.0.2 for FF, oops...!!
OK, back to square one then...! :cry:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tom, Tech Support
Posts: 3522
Joined: Mon May 31, 2010 4:59 pm

Re: iMacros FILEDELETE

Post by Tom, Tech Support » Thu Mar 07, 2019 12:08 am

Nice try chivracq!

I think the only temporary workaround would be to use legacy iMacros for Firefox (8.9.7) with Firefox 56 or older. There's no telling at this point when a fix might be available for the iMacros browser or iMacros for IE (these two products typically only have two releases per year, with the last one being in November).
Regards,

Tom, iMacros Support
haitashe
Posts: 11
Joined: Mon Feb 25, 2019 3:19 pm

Re: iMacros FILEDELETE

Post by haitashe » Thu Mar 07, 2019 9:52 pm

chivracq wrote:
Wed Mar 06, 2019 11:26 pm
My 2 cts...:
Why not use iMacros for FF v10.0.2 rather than the iMacros Browser then...? :o

If v8.9.7 for FF is/was not locking the File, then "chances" are that v10.0.2 for FF won't lock the File either, even if you would need to test that of course... :wink:

The 'PE' Version for v10.0.x for FF/CR is cheaper than iMB v12.x anyway, and for some "simple" 'File Upload' Functionality, you probably don't need all the extended Functionality (like the 'DS' Mode) from iMB...
(v10.0.5 for CR wouldn't be an Option as 'FILEDELETE' is not supported at all on CR.)

Another Option would be to use Pale Moon instead of plain FF, for which iMacros v8.9.7 for FF still works (on PM27 or PM28). And PM is much more reliable and stable than FF anyway... :idea:

EDIT:
Arrrggghhh...!! "File upload is not supported...!" in v10.0.2 for FF, oops...!!
OK, back to square one then...! :cry:
Thank you for your answer chivracq, I started testing old version of iMacros in PaleMoon and yes, it works so much better than glitchy FF (outdated). The file upload doesn't work in 10.0.2 as you saying which is bad and not suitable already for us, PE we can't use also because we are working as a team with 4 more people, Enterprise version gives us the additional 5 machines to use with the same license, also the newest version of iMacros browser or IE I hope so, they have functionality like image validation which is very useful for us, as there is a lot of banks with security when you only can mouse click on PIN codes, the image validation do this work amazingly and we love it.
Older versions cannot do this, 8.9.7 was the best version, but it's already outdated and doesn't have functionality which we need in 2019.

The biggest problem here is the FILEDELETE which locks the file and f***k up our all automation. :)
chivracq
Posts: 8696
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: iMacros FILEDELETE

Post by chivracq » Fri Mar 08, 2019 4:03 am

Tom, Tech Support wrote:
Thu Mar 07, 2019 12:08 am
Nice try chivracq!

I think the only temporary workaround would be to use legacy iMacros for Firefox (8.9.7) with Firefox 56 or older. There's no telling at this point when a fix might be available for the iMacros browser or iMacros for IE (these two products typically only have two releases per year, with the last one being in November).
Yep I know and that's why I didn't mention FF56 or FF55, as @OP was already using v8.9.7 for FF, and probably on FF[52-56], Reason why they opened this Thread I would think, working for a Bank and "forced" by the IT-Dept to update FF55 to FF65 or stg like that, breaking Compatibility with iMacros for FF v8.9.7...

@Tom, the 'File Upload' this User wants/needs is very "basic" Functionality..., => do you realize that @OP, went "investigating"/"checking" iMB (v12.5) only because v10.0.2 for FF didn't support 'File Upload' [anymore/yet]..., and 'FILEDELETE' not working in IMB v12.5 was the Reason they opened a Thread on the Forum... :shock:

OK, it was not supported [yet] in the first Version for v10.x for FF, but we are now about 8 months later, any chance some v10.x for FF will be released soon, => supporting 'File Upload' + 'EVENT' Mode + '.js' Scripts maybe...? :idea: :idea: :idea:
Already 3 (and soon 4, one in the make) Versions for v10.x for CR have already been released since v10.0.2 for FF got released... FF wants also a Release...! (And the Crowd will be cheering...!! :D )

Yep again, 'File Upload' is fairly "basic" Functionality for Web-Automation, OK for one "first" Version compatible with WebExtensions, we are now 8 months later, and hardly any "Improvement", only Workaround on Workaround, and I'm probably the only one who would still be able to use that Version a bit like I've been using iMacros for the last 10 years... (I've only posted on this Forum about 20-30% of all the Techniques and "Tricks" I use...)

=> Maybe an "IDEA" to first get some v10.x for FF supporting 'File Upload' + 'EVENT' Mode, + '.js' Script (if possible), and much more Functionality that was always part of iMacros for FF.... :idea: :idea: :idea: :idea: :idea:

(Hum, I hope I didn't get too "excited", ah-ah...! :wink: )

haitashe wrote:
Thu Mar 07, 2019 9:52 pm
chivracq wrote:
Wed Mar 06, 2019 11:26 pm
My 2 cts...:
Why not use iMacros for FF v10.0.2 rather than the iMacros Browser then...? :o

If v8.9.7 for FF is/was not locking the File, then "chances" are that v10.0.2 for FF won't lock the File either, even if you would need to test that of course... :wink:

The 'PE' Version for v10.0.x for FF/CR is cheaper than iMB v12.x anyway, and for some "simple" 'File Upload' Functionality, you probably don't need all the extended Functionality (like the 'DS' Mode) from iMB...
(v10.0.5 for CR wouldn't be an Option as 'FILEDELETE' is not supported at all on CR.)

Another Option would be to use Pale Moon instead of plain FF, for which iMacros v8.9.7 for FF still works (on PM27 or PM28). And PM is much more reliable and stable than FF anyway... :idea:

EDIT:
Arrrggghhh...!! "File upload is not supported...!" in v10.0.2 for FF, oops...!!
OK, back to square one then...! :cry:
Thank you for your answer chivracq, I started testing old version of iMacros in PaleMoon and yes, it works so much better than glitchy FF (outdated). The file upload doesn't work in 10.0.2 as you saying which is bad and not suitable already for us, PE we can't use also because we are working as a team with 4 more people, Enterprise version gives us the additional 5 machines to use with the same license, also the newest version of iMacros browser or IE I hope so, they have functionality like image validation which is very useful for us, as there is a lot of banks with security when you only can mouse click on PIN codes, the image validation do this work amazingly and we love it.
Older versions cannot do this, 8.9.7 was the best version, but it's already outdated and doesn't have functionality which we need in 2019.

The biggest problem here is the FILEDELETE which locks the file and f***k up our all automation. :)
Euh, yep indeed, my previous Reply was meant for both 'Quotes'...

I have some other Thread where I'm trying to "convince" Ipswitch to post/publish some "Roadmap" about their next Versions, for all "Flavours"... I've been asking for a "long" while, to no avail..., probably because I was the only one asking..., maybe with some "Support", we might book some Result...? :idea:

Yeah, stupid "Thought" from me of course, ah-ah...! :oops: , I've been maintaining some other Thread for several Years, (3 years I think), always waiting for Support from other Users to get "Things" change with iMacros, and I think only 3 or 4 times I managed to get a min-'Bump' because the User wanted exactly that Functionality that I had been asking for several years already... And my Enh-Req Thread is here...: ("Enh-Req" = Enhancement-Request")
- Re: List of EnhReq's...!! [by @chivracq]

[I repeat a few things I realize, more than 2 or 3 hours between when I started this Post, and finally got a chance to keep-going / finish it...]
But, hum, I would think that the "Things" I repeat are probably a bit "important"... :idea:

[Some Content moved to my next Post...]
Last edited by chivracq on Fri Mar 08, 2019 7:07 am, edited 3 times in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply