0

I am downloading files with selenium and whenever a new file is downloaded, the window comes into focus. Is there a way to keep the window unfocused and maybe also not to flash orange in windows?

Currently I am on chrome but ideally it should work for firefox as well.

weasel
  • 534
  • 1
  • 5
  • 18
  • The `window` you mean is the download complete dialog? If that so, you can [change the browser's setting in selenium](https://stackoverflow.com/questions/20884089/dynamically-changing-proxy-in-firefox-with-selenium-webdriver/48816511#48816511) – Minh Dao Feb 04 '20 at 02:28
  • You can easily set it to headless mode. reference: https://stackoverflow.com/questions/46753393/how-to-make-firefox-headless-programmatically-in-selenium-with-python – Yun Feb 05 '20 at 03:56
  • don't want it to be headless just unfocused – weasel Feb 05 '20 at 12:05

1 Answers1

0

If you are you talking about the Browser getting focus on the desktop, you could use selenium in docker from https://hub.docker.com/u/selenium

If you want to see what happens use the *debug version you can use VNC to look at it.

e.g. docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm selenium/standalone-chrome-debug

then use VNC to connect to localhost:5900 with secret as password

INDIVIDUAL-IT
  • 426
  • 3
  • 11