I'm trying to learn web test automation with Selenium and I'm facing the following issue: I created a virtual environment and installed all python libraries needed, it might be important to mention that I want to use Robot Framework with the SeleniumLibrary. I use PopOS, so I downloaded the appropriate geckodriver to work with the Firefox installation that comes preinstalled in the OS. I wrote a basic script based on the example provided by the SeleniumLibrary developers and ran it. Then I got the error Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line. So I'm failing to open the browser. What is weird to me is that the firefox executable is in /usr/bin as expected, so I have no clue on what I could do in this situation. I'm using the latest available stable versions of the webdrivers and browser.
I thought that the issue might be the virtual environment trying to access something that it is not allowed, so I tried changing the access permissions of the firefox executable but nothing changed.
EDIT: I tried adding the path to the Firefox binary using FirefoxOptions from selenium webdriver as below:
from selenium import webdriver
from selenium.webdriver import FirefoxOptions
options = FirefoxOptions()
options.binary=r"/usr/bin/firefox"
browser = webdriver.Firefox(options=options)
browser.get('https://google.com')
But still no success... Now it returns InvalidArgumentException: Message: binary is not a Firefox executable
Again, the file I'm pointing to is a Firefox executable and opens it normally.