I use selenium on Python 2.7 and it only works if using version 2.53.6 associated with firefox 45.0.2. Any other versions, returns this error or similar:
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmpaQkqJv If you specified a log_file in the FirefoxBinary constructor, check it for details.
Every day there is at least one Firefox update, and I tried many solutions to avoid this, but I still need to run
sudo apt-get install firefox=45.0.2+build1-0ubuntu1
I created a cron job to do it for me, but for some reason, it just doesn't work.
Here is the shell file
#!/bin/bash
PATH=/opt/someApp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin
sudo apt-get install --allow-downgrades -y firefox=45.0.2+build1-0ubuntu1 >> logs2.txt
Here are some of the cron jobs I tried (from crontab -e):
32 * * * * root (apt-get install --allow-downgrades -y firefox=45.0.2+build1-0ubuntu1)
32 * * * * /home/stefanolinux/firefox_update.sh >> firefox_update_works.txt
as root:
@hourly apt-get install firefox=45.0.2+build1-0ubuntu1
32 * * * * apt-get install --allow-downgrades -y firefox=45.0.2+build1-0ubuntu1
more frustrating is to see that the same script works without any downgrade needed (both for firefox and selenium) when running from Windows. Any suggestion?