Automatic download on firefox


Regarding the browser: Firefox

I’ve ran into a problem regarding a test script.
In my script I am downloading a .pdf file.
However every time I click on the button and the file generates, I get the Browser Alert message if I want to open it or download it.

While I can click on “always download, remember button” Once the browser closes and Katalon initiates a new instance, I get the popup again as it’s a clean session.

I’ve tried to look for a proper solution on the net but can’t find it. Is there anyone that can help me with this?
These are the settings I have added in Katalon for Firefox Profile.

application/download, application/octet-stream, text/csv, application/, application/msexcel, application/x-msexcel, application/excel, application/pdf

Thanks in advance.

Maybe set a fixed path for your Downloads…

This post could maybe help:

I looked into that one. Not sure if it could work with firefox, but…
The computers in here at work are based on an image. So everytime I boot up the computer it is as if it’s a fresh setup.

I’m using a USB stick for the Katalon executable and project so that I don’t have to do all that every day… But for the thing on that link, I will have to do that (if it works) every day which is not wanted.

So I am wondering if there is any other solution perhaps in Katalon itself to solve this problem?

Selenium allows you to set capabilities programmatically. I’m sure @Brandon_Hein can share a line or two of wisdom here.

Hi @paulo.resende

want to download Docx file how will it be helpful for me I tried so many but no luck could you please help me.

Hey @bhargavia

To go around this issue I have used the Robot Framework
import java.awt.Robot
import java.awt.event.KeyEvent

Robot rb = new Robot()

So basically the RobotClass will press the enter button and release the enter button for me.
The thing with this is, It has to be your active window… If you use your computer while the Robot wants to press something, it will press on the window/application which you are currently using.

Couldn’t find a better solution for this sadly. But this seems to be a common issue regarding test automation.

Hope it helps!

Thank you @paulo.resende i will try this.