diff --git a/plinth/conftest.py b/plinth/conftest.py index 6ab851b0c..df8527692 100644 --- a/plinth/conftest.py +++ b/plinth/conftest.py @@ -121,6 +121,15 @@ def splinter_wait_time(): return 0.01 +@pytest.fixture(scope='session') +def splinter_driver_kwargs(): + """Disable smooth scrolling to fix 'Element x not clickable' errors.""" + from selenium.webdriver.firefox.options import Options + driver_options = Options() + driver_options.set_preference('general.smoothScroll', False) + return {'options': driver_options} + + @pytest.fixture(scope='session') def splinter_browser_load_condition(): """When a page it loaded, wait until is available."""