Created
August 20, 2012 17:05
-
-
Save els-pnw/3405849 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
login_org_name_selector_css = ('a') |
This file contains hidden or 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
def click_by_text(self, css, name): | |
_text_locator = (By.XPATH, "//%s[text() = '%s']" % (css, name)) | |
self.selenium.find_element(*_text_locator).click() |
This file contains hidden or 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
from pages.locators import * | |
@pytest.mark.nondestructive | |
class TestDashboard: | |
def test_dashboard_present(self, mozwebqa): | |
""" | |
Verify dashboard page contains key elements. | |
""" | |
home_page = Home(mozwebqa) | |
home_page.login() | |
# | |
# The following two lines can be consolidated into a single method to | |
# reduce code. | |
# | |
home_page.click(*login_org_dropdown) | |
home_page.click_by_text(login_org_name_selector_css, home_page.org) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment