mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02: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:
parent
8c610404bd
commit
d45dea56c5
3 changed files with 7 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue