From f0ed38edf33947fad539d43b7b3fbabf82816518 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 28 Nov 2019 00:24:19 -0800 Subject: [PATCH] Refs #29892 -- Replaced Selenium .submit() shim with .click() on the submit button. There is no WebDriver submit primitive. The Selenium project implements it as a convenience only. The geckodriver developers recommend against using it. Replace it with a real primitive, click on the submit button. Fixes failing Seleninum test test_date_time_picker_shortcuts when using the Firefox Selenium driver. --- tests/admin_widgets/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 32f065b325..f854f4dc20 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -941,7 +941,7 @@ class DateTimePickerShortcutsSeleniumTests(AdminWidgetSeleniumTestCase): # Submit the form. with self.wait_page_loaded(): - self.selenium.find_element_by_tag_name('form').submit() + self.selenium.find_element_by_name('_save').click() # Make sure that "now" in javascript is within 10 seconds # from "now" on the server side.