Scroll to buttons before clicking on them in Selenium tests. Fixes #3314. Commit ready for merge.
- Legacy-Id: 19153
This commit is contained in:
parent
a32d00af0a
commit
d61e26567d
|
@ -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(
|
||||
|
|
|
@ -862,6 +862,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
|
||||
|
@ -927,6 +928,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'])
|
||||
|
||||
|
@ -968,6 +970,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)
|
||||
|
@ -1077,6 +1080,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),
|
||||
|
@ -1109,6 +1113,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),
|
||||
|
@ -1128,6 +1133,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),
|
||||
|
@ -1585,6 +1591,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()
|
||||
|
|
Loading…
Reference in a new issue