Commit 29e4ba95 by Ben Patterson

Special condition needed for newer firefox version.

On the older firefox version (28), the offset approach fails. This
update is being made as part of an effort to upgrade to firefox 42
incrementally. So we are including logic for Firefox 28 vs 42 that
we can remove after the upgrade.
parent 2b731b70
......@@ -263,9 +263,14 @@ class CourseOutlineContainer(CourseOutlineItem):
currently_expanded = subsection_expanded()
# TODO: Special offset needed for newer firefox version. This was only tested with Firefox 42.
firefox_version = float(self.browser.capabilities['version'])
if firefox_version >= 42:
# Need to click slightly off-center in order for the click to be recognized.
ele = self.browser.find_element_by_css_selector(self._bounded_selector('.ui-toggle-expansion i'))
ActionChains(self.browser).move_to_element_with_offset(ele, 1, 1).click().perform()
else:
self.q(css=self._bounded_selector('.ui-toggle-expansion i')).first.click()
self.wait_for_element_presence(self._bounded_selector(self.ADD_BUTTON_SELECTOR), 'Subsection is expanded')
EmptyPromise(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment