How to run Selenium with Firefox?

I am trying to write a script that uses Selenium (the Python bindings) with Firefox browser through geckodriver webdriver in Whonix Workstation.

It launches the browser but never loads a test URL.

After I interrupt the script with Ctrl-C, I get Python traceback looking like this:

selenium/webdriver/firefox/", line 73, in launch_browser

geckodriver logs lines like these:

geckodriver INFO Listening on

the port number is picked randomly, since it’s always different.

This looks like a firewalling issue at loopback interface level, but I’m not sure about it. What do I need to do to make it work?

Listening port, firewall is probably not an issue.

Opening server ports on localhost in the workstation such as with a web server (in context of Onion Services - Whonix) is a common thing.


What could get into the way is the stream isolation default configuration: