Selenium with librewolf binary is not a Firefox executable

82 views Asked by At

When trying to open the firefox webdriver with selenium in python I get the Message: binary is not a Firefox executable. This is strange because it has worked a few updates (both selenium and librewolf) earlier.

this is my code:

from selenium import webdriver

options = webdriver.FirefoxOptions()
options.binary_location = '/usr/bin/librewolf'
service = webdriver.FirefoxService('/usr/bin/geckodriver')

driver = webdriver.Firefox(options=options, service=service)

driver.quit()

this returns Message: binary is not a Firefox executable

I ran these commands to make sure that the binary locations are correct.

$ which geckodriver
/usr/bin/geckodriver
$ which librewolf
/usr/bin/librewolf

I compiled librewolf with

+X
+clang
+eme-free
+geckodriver
+gmp-autoupdate
+hardened
+hwaccel
+jumbo-build
+lto
+openh264
+system-av1
+system-harfbuzz
+system-icu
+system-jpeg
+system-libevent
+system-libvpx
+system-png
+system-python-libs
+system-webp

enabled. So I don't think that that is the problem.

$ librewolf --version
LibreWolf LibreWolf 122.0-2
$ emerge -s selenium
dev-python/selenium
      Latest version available: 4.16.0
      Latest version installed: 4.16.0

How do I get Selenium running with librewolf? Is there perhaps a Selenium alternative ( I need javascript ) Thanks in advance.

0

There are 0 answers