1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

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.
This commit is contained in:
Jon Dufresne 2019-11-28 00:24:19 -08:00 committed by Carlton Gibson
parent ff1b19da67
commit f0ed38edf3

View File

@ -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.