django icon indicating copy to clipboard operation
django copied to clipboard

Fixed selenium tests in Firefox.

Open pbratkowski opened this issue 5 months ago • 0 comments

Unlike Chromium-based browsers, Firefox does not automatically scroll elements into view when using the Actions API with move_to_element. This calls the scrollIntoView function explicitly, which fixes some selenium tests when not running in headless mode.

Namely, the admin_views.tests.SeleniumTests.test_prepopulated_fields test has a page larger than the viewport, and some elements are hidden, leading the test failing with an Exception like:

selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: Move target (570, 968) is out of bounds of viewport dimensions (1280, 955)

pbratkowski avatar Nov 30 '23 13:11 pbratkowski