Reputation: 89
I'm running on Ubuntu 16.04.
I've been dealing with this issue for a while now, and I have not been able to find a solution on my own. When I run python3 manage.py test, my tests are to open a Firefox browser via Selenium and execute some functional tests. I get the same error message on every test I try to run;
selenium.common.exceptions.WebDriverException: Message: Failed to start browser /home/spa/Desktop/firefox: permission denied
I have tried to do chmod a+rwx on the firefox folder, but I still get the same error. Attempting to sudo python3 manage.py test results in the same issue. Any help would be appreciated.
Upvotes: 1
Views: 1265
Reputation: 675
I have had a similar problem on my Mac when starting firefox using a binary path. What i did to fix it is, i gave the binary path to the exact file needed to start firefox (usually a shell script inside the firefox folder)
There have been some problems with opening browsers from folders as seen here so this was the only way I found how to fix the problem.
There is also 1 more reason i could think of, why it would not work, there might be an incompatibility between your selenium and the firefox you are using. What is the version and what's the actual code you use?
Upvotes: 1