mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[fix] selenium: binary is not a Firefox executable
Since Ubuntu installs firefox frrom snap, we can't use any longer
``Browser('firefox')``.
[1] https://github.com/searxng/searxng/pull/3663#issuecomment-2255963036
[2] https://splinter.readthedocs.io/en/latest/drivers/firefox.html#custom-binary-path
Suggested-by: @allendema
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
committed by
Markus Heiser
parent
8c610404bd
commit
d45dea56c5
@@ -7,6 +7,7 @@ import os
|
||||
import subprocess
|
||||
import traceback
|
||||
import pathlib
|
||||
import shutil
|
||||
|
||||
from splinter import Browser
|
||||
|
||||
@@ -53,6 +54,9 @@ class SearxRobotLayer:
|
||||
|
||||
def run_robot_tests(tests):
|
||||
print('Running {0} tests'.format(len(tests)))
|
||||
print(f'{shutil.which("geckodriver")}')
|
||||
print(f'{shutil.which("firefox")}')
|
||||
|
||||
for test in tests:
|
||||
with Browser('firefox', headless=True, profile_preferences={'intl.accept_languages': 'en'}) as browser:
|
||||
test(browser)
|
||||
|
||||
Reference in New Issue
Block a user