# Download files from web ui not working

**URL:** <https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845>\
**Category:** Bug Report\
**Tags:** katalon-studio, bugs-report\
**Created:** [January 14, 2018, 11:23am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845 "2018-01-14T11:23:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.katalon.com/u/tom1)\
**Post date:** [January 14, 2018, 11:23am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/1 "2018-01-14T11:23:08Z")

</div>

hi !  
to learn how to download files from web ui, i have downloaded the example scripts from [https://www.katalon.com/resources-center/tutorials/handle-file-uploads/](https://www.katalon.com/resources-center/tutorials/handle-file-uploads/) …

i want to download the file into the default download directory.  
so my project settings for firefox are as follows

**browser.download.manager.showWhenStarting** : Boolean : false

**browser.helperApps.neverAsk.saveToDisk** : String : text/csv,application/vnd.ms-excel,application/msexcel,application/x-msexcel,application/excel

**browser.helperApps.neverAsk.openFile** : String : text/csv,application/vnd.ms-excel,application/msexcel,application/x-msexcel,application/excel

But the the excel file (smilechart.xls) on [Excel Templates [Free Download]](http://spreadsheetpage.com/index.php/file/C35/P10/)  
could only be downloaded after clicking the download button manually. it is still possible to choose between _Open with “Microsoft Excel”_ or _Save file._ But this dialog should be suppressed with the settings above.  
because this is very important for our solution, please let me know some hints how to solve this problem. many thanks

tom

i am using: Firefox 57, Katalon Studio 5.2.0 build 1, Win 7/64

---

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.katalon.com/u/tom1)\
**Post date:** [January 14, 2018, 11:38am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/2 "2018-01-14T11:38:35Z")

</div>

> i will give you with the console output until the dialogbox appears…see attachment

[console output until dialog box appears.txt](https://s3.amazonaws.com/katalon-forum/editor/87/f5c49a9h7lgy.txt)

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [January 14, 2018, 12:24pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/3 "2018-01-14T12:24:25Z")

</div>

Can you show me how you use those settings in Project -\> Settings?

---

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.katalon.com/u/tom1)\
**Post date:** [January 14, 2018, 12:39pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/4 "2018-01-14T12:39:22Z")

</div>

> [Vinh Nguyen](https://forum.katalon.com/profile/33/Vinh%20Nguyen) said:
> 
> Can you show me how you use those settings in Project → Settings?

here is the screenshot with the settings in Project \> Settings: ![](https://s3.amazonaws.com/katalon-forum/editor/z2/n92l3rjg1o3e.jpg "Image: https://s3.amazonaws.com/katalon-forum/editor/z2/n92l3rjg1o3e.jpg")

[projsettings.JPG](https://s3.amazonaws.com/katalon-forum/editor/z2/n92l3rjg1o3e.jpg)

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [January 14, 2018, 2:09pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/5 "2018-01-14T14:09:54Z")

</div>

I’ve figured out you have to put these settings into ‘firefox\_profile’ map, like this:  
 ![](https://s3.amazonaws.com/katalon-forum/editor/xy/tlv0vh0679mh.png "Image: https://s3.amazonaws.com/katalon-forum/editor/xy/tlv0vh0679mh.png")

[2018-01-14\_210932.png](https://s3.amazonaws.com/katalon-forum/editor/xy/tlv0vh0679mh.png)

---

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.katalon.com/u/tom1)\
**Post date:** [January 14, 2018, 5:58pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/6 "2018-01-14T17:58:48Z")

</div>

hi !

many thanks 😃 . this works and this is my Dictionary.

![](https://s3.amazonaws.com/katalon-forum/editor/3v/7v21o11cpowa.jpg "Image: https://s3.amazonaws.com/katalon-forum/editor/3v/7v21o11cpowa.jpg")

But there are more questions:  
\*\*what should i do to test this also with Chrome, IE, Safari etc.?  
\*\ ***what are the names of the profiles ?**  
thanks for your support

tom

[dict3.JPG](https://s3.amazonaws.com/katalon-forum/editor/3v/7v21o11cpowa.jpg)

---

<div class="post-metadata">

**Author:** ![Cornel\_Neacsu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/cornel_neacsu/32/914_2.png) [@Cornel\_Neacsu](https://forum.katalon.com/u/Cornel_Neacsu)\
**Post date:** [January 22, 2018, 9:01am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/7 "2018-01-22T09:01:02Z")

</div>

Hello,

This answer is great and worked for me also.  
But I am also lobby-ing for other browser profile configurations: Chrome, IE, Safari, where possible.

Thank you,  
Cornel Neacsu

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [January 23, 2018, 2:51am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/8 "2018-01-23T02:51:44Z")

</div>

> Cornel Neacsu said:
> 
> Hello,
> 
> This answer is great and worked for me also.  
> But I am also lobby-ing for other browser profile configurations: Chrome, IE, Safari, where possible.
> 
> Thank you,  
> Cornel Neacsu

For Chrome: You should pass it like this: [Download files in Chrome browser using selenium WebDriver - qavalidation](https://qavalidation.com/2016/03/selenium-downloadfiles-chrome.html/)

![](https://s3.amazonaws.com/katalon-forum/editor/nv/91tqi6kqc034.png "Image: https://s3.amazonaws.com/katalon-forum/editor/nv/91tqi6kqc034.png")

IE & Safari doesn’t provide automatic download, so you need to handle this by yourself using scripting I believe

[Screen Shot 2018-01-23 at 09.47.46.png](https://s3.amazonaws.com/katalon-forum/editor/nv/91tqi6kqc034.png)

---

<div class="post-metadata">

**Author:** ![Dave\_Weil1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_weil1/32/20464_2.png) [@Dave\_Weil1](https://forum.katalon.com/u/Dave_Weil1)\
**Post date:** [February 16, 2018, 6:36pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/9 "2018-02-16T18:36:32Z")

</div>

Unsure what I need to do in order to get the Chrome download go to into a specific folder? I see the link above, but unsure where to place this and how to pass a folder to download into. We only use Chrome for our testing at this time. What are the arg values for the above screenshot?

Thank you for any assistance.

Dave

---

<div class="post-metadata">

**Author:** ![Nikita\_Channawar](https://avatars.discourse-cdn.com/v4/letter/n/c6cbf5/32.png) [@Nikita\_Channawar](https://forum.katalon.com/u/Nikita_Channawar)\
**Post date:** [March 20, 2018, 4:49am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/10 "2018-03-20T04:49:46Z")

</div>

Can you please help how to handle download in Internet Explorer? As i got tomorrow last day to present in front of manager to get approval for Katalon in our company.  
Need your Urgent help.

---

<div class="post-metadata">

**Author:** ![Marivic\_E\_Lorilla](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marivic_e_lorilla/32/5692_2.png) [@Marivic\_E\_Lorilla](https://forum.katalon.com/u/Marivic_E_Lorilla)\
**Post date:** [March 23, 2018, 9:46am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/11 "2018-03-23T09:46:30Z")

</div>

> Dave Weil said:
> 
> Unsure what I need to do in order to get the Chrome download go to into a specific folder? I see the link above, but unsure where to place this and how to pass a folder to download into. We only use Chrome for our testing at this time. What are the arg values for the above screenshot?
> 
> Thank you for any assistance.
> 
> Dave

Hi,

This one is as well my problem before. And it took me weeks to solve. Got them solved (with God’s help). See below Desired Capabilities applied in Chrome execution settings:

![](https://s3.amazonaws.com/katalon-forum/editor/7h/ie09evkta9ka.png "Image: https://s3.amazonaws.com/katalon-forum/editor/7h/ie09evkta9ka.png")  
prefs contains:  
profile.default\_content\_settings.popups | Number | 0  
download.default\_directory | String | C:\Shared - you can change the path to your desired location

args contains:  
String | --test-type  
String | --disable-extensions

Hope this helps.

My problem now is how to set the filename accdg to my preference. That, i am still working on.

[image.png](https://s3.amazonaws.com/katalon-forum/editor/7h/ie09evkta9ka.png)

---

<div class="post-metadata">

**Author:** ![Eileen](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@Eileen](https://forum.katalon.com/u/Eileen)\
**Post date:** [March 26, 2018, 3:36am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/12 "2018-03-26T03:36:58Z")

</div>

> [tom](http://forum.katalon.com/profile/3131/tom) said:
> 
> hi !
> 
> many thanks 😃 . this works and this is my Dictionary.
> 
> ![](https://s3.amazonaws.com/katalon-forum/editor/3v/7v21o11cpowa.jpg "Image: https://s3.amazonaws.com/katalon-forum/editor/3v/7v21o11cpowa.jpg")
> 
> But there are more questions:  
> \*\*what should i do to test this also with Chrome, IE, Safari etc.?  
> \*\ ***what are the names of the profiles ?**  
> thanks for your support
> 
> tom

Hi all,

I added application/pdf as Value for browser.helperApps.neverAsk.saveToFile but the dialog still pops up when the test click on the download icon.

Anyone encounter this as well?

Many thanks for any solution/suggestion given.

---

<div class="post-metadata">

**Author:** ![Manisha\_Gupta](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Manisha\_Gupta](https://forum.katalon.com/u/Manisha_Gupta)\
**Post date:** [March 29, 2018, 6:55am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/13 "2018-03-29T06:55:09Z")

</div>

For me also, while downloading the pdf the dialog box gets opened up as the test clicks on the download icon.  
Could you please help in downloading a pdf file

---

<div class="post-metadata">

**Author:** ![Eileen](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@Eileen](https://forum.katalon.com/u/Eileen)\
**Post date:** [April 17, 2018, 2:43am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/14 "2018-04-17T02:43:16Z")

</div>

> [Eileen](http://forum.katalon.com/profile/5308/Eileen) said:
> 
> > [tom](http://forum.katalon.com/profile/3131/tom) said:
> > 
> > hi !
> > 
> > many thanks 😃 . this works and this is my Dictionary.
> > 
> > ![](https://s3.amazonaws.com/katalon-forum/editor/3v/7v21o11cpowa.jpg)
> > 
> > But there are more questions:  
> > \*\*what should i do to test this also with Chrome, IE, Safari etc.?  
> > \*\ ***what are the names of the profiles ?**  
> > thanks for your support
> > 
> > tom
> 
> Hi all,
> 
> I added application/pdf as Value for browser.helperApps.neverAsk.saveToFile but the dialog still pops up when the test click on the download icon.
> 
> Anyone encounter this as well?
> 
> Many thanks for any solution/suggestion given.

In firefox\_profile map, Add setting: pdfjs.disabled || True

---

<div class="post-metadata">

**Author:** ![Carlos\_Fontana](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Carlos\_Fontana](https://forum.katalon.com/u/Carlos_Fontana)\
**Post date:** [May 23, 2018, 7:41pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/15 "2018-05-23T19:41:03Z")

</div>

> Marivic E. Lorilla said:
> 
> > Dave Weil said:
> > 
> > Unsure what I need to do in order to get the Chrome download go to into a specific folder? I see the link above, but unsure where to place this and how to pass a folder to download into. We only use Chrome for our testing at this time. What are the arg values for the above screenshot?
> > 
> > Thank you for any assistance.
> > 
> > Dave
> 
> Hi,
> 
> This one is as well my problem before. And it took me weeks to solve. Got them solved (with God’s help). See below Desired Capabilities applied in Chrome execution settings:
> 
> ![](https://s3.amazonaws.com/katalon-forum/editor/7h/ie09evkta9ka.png)  
> prefs contains:  
> profile.default\_content\_settings.popups | Number | 0  
> download.default\_directory | String | C:\Shared - you can change the path to your desired location
> 
> args contains:  
> String | --test-type  
> String | --disable-extensions
> 
> Hope this helps.
> 
> My problem now is how to set the filename accdg to my preference. That, i am still working on.

It does not work for me ☹

---

<div class="post-metadata">

**Author:** ![imran\_ali](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@imran\_ali](https://forum.katalon.com/u/imran_ali)\
**Post date:** [May 26, 2018, 7:14am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/16 "2018-05-26T07:14:16Z")

</div>

The following settings worked for me on

| Google Chrome | 66.0.3359.181 |

![](https://s3.amazonaws.com/katalon-forum/editor/05/1mdi7a2ihsku.png "Image: https://s3.amazonaws.com/katalon-forum/editor/05/1mdi7a2ihsku.png")  
where perfs contains the following settings

![](https://s3.amazonaws.com/katalon-forum/editor/q8/kpu3trs6jfwb.png "Image: https://s3.amazonaws.com/katalon-forum/editor/q8/kpu3trs6jfwb.png")

Below is what my groovy script looks like

```auto

'Define Custom Path where file needs to be downloaded'
String downloadPath = 'C:\\temp'
'Wait for Some time so that file gets downloaded and Stored in user defined path'
WebUI.delay(10)
'Verifying the file is download in the User defined Path'
Assert.assertTrue(isFileDownloaded(downloadPath, '.csv'), 'Failed to download Expected document')
WebUI.closeBrowser() //Iterating a loop for number of files available in the folder to verify file name in the folder
boolean isFileDownloaded(String downloadPath, String fileName) {
    boolean flag = false
    'Creating an object for File and passing the download Path as argument'
    File dir = new File(downloadPath)
    'Creating an Array where it will store all the files from that folder'
    File[] dir_contents = dir.listFiles()
    for (int i = 0; i < dir_contents.length; i++) {
        println('File Name at 0 is : ' + dir_contents[i].getName())
        'Verifying the file name is available in the folder '
        if (dir_contents[i].getName().contains(fileName)) {
            'If the file is found then it will return a value as true'
            return flag = true
        }
    }
    
    'If the file is found then it will return a value as false'
    return flag
}

```

[2018\_05\_26\_03\_09\_59\_Project\_Settings.png](https://s3.amazonaws.com/katalon-forum/editor/q8/kpu3trs6jfwb.png)

[2018\_05\_26\_03\_10\_53\_Katalon\_Studio\_CommandCenterEnterpriseRegression\_Location\_C\_Users\_imran\_K.png](https://s3.amazonaws.com/katalon-forum/editor/05/1mdi7a2ihsku.png)

---

<div class="post-metadata">

**Author:** ![Fernanda\_Lopez](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@Fernanda\_Lopez](https://forum.katalon.com/u/Fernanda_Lopez)\
**Post date:** [May 31, 2018, 7:08pm UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/17 "2018-05-31T19:08:55Z")

</div>

In firefox\_profile map , I have the next dictionary:  
with pdfjs.disable true, the file didn’t download, but if i don’t write this preference the download file popup is opened. I am using an image button  
 ![](https://s3.amazonaws.com/katalon-forum/editor/z2/5jkslu2nnk10.png)

The code in the script to download the file is:

if (true) {

WebUI.waitForElementClickable(findTestObject(‘Page\_Servicio de Rentas Internas/img’), 2)

if (true) {

//Dar click sobre el icono pdf para descargar el archivo’

WebUI.click(findTestObject(‘Page\_Servicio de Rentas Internas/img’))

//Esperar para que el archivos se descargue en el path definido por el usuario

WebUI.delay(10)

}

}

how can i download the file without to see the popup opened?

[firefox\_profile\_dictionary.png](https://s3.amazonaws.com/katalon-forum/editor/z2/5jkslu2nnk10.png)

---

<div class="post-metadata">

**Author:** ![Girish\_Mohite](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@Girish\_Mohite](https://forum.katalon.com/u/Girish_Mohite)\
**Post date:** [July 23, 2018, 10:29am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/18 "2018-07-23T10:29:14Z")

</div>

I am using similar settings for chrome, but unable to download, Do i also need some code in this case other than settings…In my case file is getting opened in another chrome window where i have to click on download button to save it to a particular folder…Please help! ![](https://s3.amazonaws.com/katalon-forum/editor/4q/nwg7gxfb46cd.png "Image: https://s3.amazonaws.com/katalon-forum/editor/4q/nwg7gxfb46cd.png") ![](https://s3.amazonaws.com/katalon-forum/editor/cs/fonkecxnxaat.png "Image: https://s3.amazonaws.com/katalon-forum/editor/cs/fonkecxnxaat.png")

[Untitled.png](https://s3.amazonaws.com/katalon-forum/editor/4q/nwg7gxfb46cd.png)

[screen.png](https://s3.amazonaws.com/katalon-forum/editor/cs/fonkecxnxaat.png)

---

<div class="post-metadata">

**Author:** ![Marivic\_E\_Lorilla](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marivic_e_lorilla/32/5692_2.png) [@Marivic\_E\_Lorilla](https://forum.katalon.com/u/Marivic_E_Lorilla)\
**Post date:** [July 31, 2018, 4:05am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/19 "2018-07-31T04:05:22Z")

</div>

> Carlos Fontana said:
> 
> > Marivic E. Lorilla said:
> > 
> > > Dave Weil said:
> > > 
> > > Unsure what I need to do in order to get the Chrome download go to into a specific folder? I see the link above, but unsure where to place this and how to pass a folder to download into. We only use Chrome for our testing at this time. What are the arg values for the above screenshot?
> > > 
> > > Thank you for any assistance.
> > > 
> > > Dave
> > 
> > Hi,
> > 
> > This one is as well my problem before. And it took me weeks to solve. Got them solved (with God’s help). See below Desired Capabilities applied in Chrome execution settings:
> > 
> > ![](https://s3.amazonaws.com/katalon-forum/editor/7h/ie09evkta9ka.png)  
> > prefs contains:  
> > profile.default\_content\_settings.popups | Number | 0  
> > download.default\_directory | String | C:\Shared - you can change the path to your desired location
> > 
> > args contains:  
> > String | --test-type  
> > String | --disable-extensions
> > 
> > Hope this helps.
> > 
> > My problem now is how to set the filename accdg to my preference. That, i am still working on.
> 
> It does not work for me ☹

Did you insert step to click download button??  
Here is the setting should exactly look like, if you find it hard to follow above instruction.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/yj/oytr9syjmf2q.png "Image: https://s3.amazonaws.com/katalon-forum/editor/yj/oytr9syjmf2q.png")

[download.png](https://s3.amazonaws.com/katalon-forum/editor/yj/oytr9syjmf2q.png)

---

<div class="post-metadata">

**Author:** ![Marivic\_E\_Lorilla](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marivic_e_lorilla/32/5692_2.png) [@Marivic\_E\_Lorilla](https://forum.katalon.com/u/Marivic_E_Lorilla)\
**Post date:** [July 31, 2018, 4:13am UTC](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845/20 "2018-07-31T04:13:19Z")

</div>

> [Girish Mohite](https://forum.katalon.com/profile/8020/Girish%20Mohite) said:
> 
> I am using similar settings for chrome, but unable to download, Do i also need some code in this case other than settings…In my case file is getting opened in another chrome window where i have to click on download button to save it to a particular folder…Please help! ![](https://s3.amazonaws.com/katalon-forum/editor/4q/nwg7gxfb46cd.png "Image: https://s3.amazonaws.com/katalon-forum/editor/4q/nwg7gxfb46cd.png") ![](https://s3.amazonaws.com/katalon-forum/editor/cs/fonkecxnxaat.png "Image: https://s3.amazonaws.com/katalon-forum/editor/cs/fonkecxnxaat.png")

Try using sendkey - CONTROL + S 🙂

[Next page](https://forum.katalon.com/t/download-files-from-web-ui-not-working/8845.md?page=2)
