Browser window control with Selenium

Asked

Viewed 927 times

1

I am automating an operation on a particular site and at a given time I need to make a download, I can authorize the download by clicking on the link but after that I lose control because it opens a Firefox window asking if I want to open or save the file, How can I automate this operation? With Selenium or with C himself#?

  • Browsers today support downloading without asking for the file save location. I think this is the simplest solution for these cases, if it is a valid option for you :). Chrome and Firefox behave like this by default in recent versions.

  • but in the specific format that will be downloaded firefox n lets you mark the save option always

1 answer

3

You can use the Autoit tool.

https://www.autoitscript.com/site/autoit/

Usually it is used in conjunction with automated machines in another language to make functions within the system, wave the tool does not reach (in your case, Selenium). I have already used the two together in a project for it to automatically save a download on IE9. And then I didn’t even need to know the language because I found on the internet the Cod. source of what I wanted. I just downloaded, compiled, converted to executable and when I needed it I called the executable. Hugs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.