tests: functional: Allow submitting form buttons along with inputs

- Sometimes <input type='submit'> are used as submit buttons and at other times
<button type='submit'> is used.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2024-08-03 09:38:09 -04:00
1 parent 1398501ec4
commit ef4292d5fc
1 file changed
+4 -3
+4 -3
View File
@@ -223,10 +223,11 @@ def submit(browser, element=None, form_class=None, expected_url=None):
if element:
click(browser, element)
elif form_class:
browser.find_by_css(
'.{} input[type=submit]'.format(form_class)).click()
browser.find_by_css(f'.{form_class} input[type=submit], '
f'.{form_class} button[type=submit]').click()
else:
browser.find_by_css('input[type=submit]').click()
browser.find_by_css(
'input[type=submit] button[type=submit]').click()
def set_app_form_value(browser, app_id, element_id, value):