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

Commit

Permalink
Fix tracking protection locator for Firefox 63 (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt authored and jrbenny35 committed Jul 23, 2018
1 parent 1d06a19 commit 0df0fb1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions foxpuppet/windows/browser/navbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class NavBar(Region):
"""

_tracking_protection_shield_locator = (By.ID, 'tracking-protection-icon')
_tracking_protection_shield_locator = (
By.ID, 'tracking-protection-icon-box')

@property
def is_tracking_shield_displayed(self):
Expand All @@ -31,6 +32,10 @@ def is_tracking_shield_displayed(self):
"""
with self.selenium.context(self.selenium.CONTEXT_CHROME):
el = self.selenium.find_element(
*self._tracking_protection_shield_locator)
if self.window.firefox_version >= 63: # Bug 1471713
el = self.root.find_element(
*self._tracking_protection_shield_locator)
else:
el = self.root.find_element(
By.ID, 'tracking-protection-icon')
return bool(el.get_attribute('state'))

0 comments on commit 0df0fb1

Please sign in to comment.