Merged in [19153] from rjsparks@nostrum.com:

Scroll to buttons before clicking on them in Selenium tests. Fixes #3314.
 - Legacy-Id: 19154
Note: SVN reference [19153] has been migrated to Git commit d61e26567d
This commit is contained in:
Robert Sparks 2021-06-24 17:45:06 +00:00
commit c9756cc106
2 changed files with 9 additions and 0 deletions

View file

@ -45,6 +45,7 @@ class MilestoneTests(IetfSeleniumTestCase):
expected_conditions.element_to_be_clickable((By.CSS_SELECTOR, submit_button_selector))
)
self.assertIn(label, submit_button.text)
self.scroll_to_element(submit_button)
submit_button.click()
def _assert_milestone_changed(self):
@ -80,6 +81,7 @@ class MilestoneTests(IetfSeleniumTestCase):
expected_conditions.element_to_be_clickable(
(By.CSS_SELECTOR, 'button.add-milestone')
))
self.scroll_to_element(add_milestone_button)
add_milestone_button.click()
edit_div = self.wait.until(

View file

@ -921,6 +921,7 @@ class AgendaTests(IetfSeleniumTestCase):
# Click the group button
group_button = self.get_agenda_filter_group_button(wait, group_acronym)
self.scroll_to_element(group_button)
group_button.click()
# Check visibility
@ -986,6 +987,7 @@ class AgendaTests(IetfSeleniumTestCase):
# enable hackathon group
group_button = self.get_agenda_filter_group_button(wait, 'hackathon')
self.scroll_to_element(group_button)
group_button.click()
self.assert_agenda_item_visibility(['mars', 'hackathon'])
@ -1027,6 +1029,7 @@ class AgendaTests(IetfSeleniumTestCase):
# Be sure we're at the URL we think we're at before we click
self.assertEqual(self.driver.current_url, url)
self.scroll_to_element(group_button)
group_button.click() # click!
expected_url = '%s?show=%s' % (url, group_acronym)
@ -1136,6 +1139,7 @@ class AgendaTests(IetfSeleniumTestCase):
),
'Modal open button not found or not clickable',
)
self.scroll_to_element(open_modal_button)
open_modal_button.click()
WebDriverWait(self.driver, 2).until(
expected_conditions.visibility_of(modal_div),
@ -1168,6 +1172,7 @@ class AgendaTests(IetfSeleniumTestCase):
),
'Modal close button not found or not clickable',
)
self.scroll_to_element(close_modal_button)
close_modal_button.click()
WebDriverWait(self.driver, 2).until(
expected_conditions.invisibility_of_element(modal_div),
@ -1187,6 +1192,7 @@ class AgendaTests(IetfSeleniumTestCase):
),
'Modal open button not found or not clickable for refresh test',
)
self.scroll_to_element(open_modal_button)
open_modal_button.click()
WebDriverWait(self.driver, 2).until(
expected_conditions.visibility_of(modal_div),
@ -1644,6 +1650,7 @@ class InterimTests(IetfSeleniumTestCase):
button = WebDriverWait(self.driver, 2).until(
expected_conditions.element_to_be_clickable(
(By.CSS_SELECTOR, 'div#calendar button.fc-next-button')))
self.scroll_to_element(button)
button.click()
seen = set()