From 4e437a9f2de7c48e6a48f468c3f03943f11851c5 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 22 Mar 2022 15:33:48 -0300 Subject: [PATCH] test: scroll swap timeslots button into view before clicking (#3719) --- ietf/meeting/tests_js.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ietf/meeting/tests_js.py b/ietf/meeting/tests_js.py index d6dd255b9..7491dec17 100644 --- a/ietf/meeting/tests_js.py +++ b/ietf/meeting/tests_js.py @@ -475,6 +475,14 @@ class EditMeetingScheduleTests(IetfSeleniumTestCase): # option to swap. If we used the first or last day, a fencepost error in # disabling options by date might be hidden. clicked_index = 1 + # scroll so the button we want to click is just below the navbar, otherwise it may + # fall beneath the sessions panel + navbar = self.driver.find_element_by_class_name('navbar') + self.driver.execute_script( + 'window.scrollBy({top: %s, behavior: "instant"})' % ( + future_swap_days_buttons[1].location['y'] - navbar.size['height'] + ) + ) future_swap_days_buttons[clicked_index].click() try: modal = wait.until(