Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox, snap, selenium = headaches #291

Open
gravitystorm opened this issue Oct 16, 2024 · 0 comments
Open

Firefox, snap, selenium = headaches #291

gravitystorm opened this issue Oct 16, 2024 · 0 comments

Comments

@gravitystorm
Copy link
Owner

Some personal notes:

andy@denali:~/src/openstreetmap-website$ git diff
diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb
index d2c3d5196..2f20736a3 100644
--- a/test/application_system_test_case.rb
+++ b/test/application_system_test_case.rb
@@ -9,6 +9,8 @@ end
 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
   driven_by :selenium, :using => :headless_firefox do |options|
     options.add_preference("intl.accept_languages", "en")
+    # git update-index --skip-worktree test/application_system_test_case.rb
+    options.binary = "/snap/firefox/current/usr/lib/firefox/firefox"
   end
 
   def before_setup
diff --git a/test/teaspoon_env.rb b/test/teaspoon_env.rb
index 8a9dc001f..9df7d04c0 100644
--- a/test/teaspoon_env.rb
+++ b/test/teaspoon_env.rb
@@ -103,7 +103,7 @@ Teaspoon.configure do |config|
   config.driver_options = {
     :client_driver => :firefox,
     :selenium_options => {
-      :options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"])
+      :options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"], :binary => "/snap/firefox/current/usr/lib/firefox/firefox")
     }
   }

TODO figure out why the JS doesn't work properly on most of the system tests - does the geckodriver need some kind of configuration override too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant