in foxpuppet/windows/browser/navbar.py [0:0]
def is_tracking_shield_displayed(self) -> bool:
"""Tracking Protection shield.
Returns:
bool: True or False if the Tracking Shield is displayed.
"""
with self.selenium.context(self.selenium.CONTEXT_CHROME):
if self.window.firefox_version >= 63: # Bug 1471713, 1476218
el = self.root.find_element(*self._tracking_protection_shield_locator)
return el.get_attribute("active") is not None
el = self.root.find_element(By.ID, "tracking-protection-icon")
return bool(el.get_attribute("state"))