Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Restore support for Firefox ESR
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt committed Aug 4, 2017
1 parent e9171d6 commit e6bf817
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions foxpuppet/windows/browser/notifications/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,27 @@ def addon_name(self):
def cancel(self):
"""Cancel add-on install."""
with self.selenium.context(self.selenium.CONTEXT_CHROME):
self.root.find_anonymous_element_by_attribute(
'anonid', 'secondarybutton').click()
if self.window.firefox_version >= 53:
# Notifications were restyled in Firefox 53
self.root.find_anonymous_element_by_attribute(
'anonid', 'secondarybutton').click()
else:
self.root.find_element(*self._cancel_locator).click()

def install(self):
"""Confirm add-on install."""
with self.selenium.context(self.selenium.CONTEXT_CHROME):
self.root.find_anonymous_element_by_attribute(
'anonid', 'button').click()
if self.window.firefox_version >= 53:
# Notifications were restyled in Firefox 53
self.root.find_anonymous_element_by_attribute(
'anonid', 'button').click()
else:
self.root.find_element(*self._confirm_locator).click()


class AddOnInstallComplete(BaseNotification):
"""Add-on install complete notification."""

def close(self):
"""Close the notification"""

with self.selenium.context(self.selenium.CONTEXT_CHROME):
self.root.find_anonymous_element_by_attribute(
'anonid', 'button').click()


class AddOnInstallRestart(BaseNotification):
"""Add-on install restart notification."""
Expand Down

0 comments on commit e6bf817

Please sign in to comment.