This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
from selenium.webdriver.common.by import By | ||
|
||
from foxpuppet.region import Region | ||
|
||
|
||
class NavBar(Region): | ||
|
||
"""Representation of the Navigation Bar | ||
:param window: Window object this region appears in. | ||
:param root: element that serves as the root for the region. | ||
:type window: :py:class:`~.windows.BaseWindow` | ||
:type root: :py:class:`~selenium.webdriver.remote.webelement.WebElement` | ||
""" | ||
_tracking_protection_shield_locator = (By.ID, 'tracking-protection-icon') | ||
|
||
@property | ||
def is_tracking_shield_displayed(self): | ||
"""Tracking Protection shield | ||
:returns: True or False if the Tracking Shield is displayed | ||
:type return: boolean | ||
""" | ||
with self.selenium.context(self.selenium.CONTEXT_CHROME): | ||
el = self.selenium.find_element( | ||
*self._tracking_protection_shield_locator) | ||
return bool(el.get_attribute('state')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters