Skip to content

Instantly share code, notes, and snippets.

@els-pnw
Created August 20, 2012 17:05
Show Gist options
  • Save els-pnw/3405849 to your computer and use it in GitHub Desktop.
Save els-pnw/3405849 to your computer and use it in GitHub Desktop.
login_org_name_selector_css = ('a')
def click_by_text(self, css, name):
_text_locator = (By.XPATH, "//%s[text() = '%s']" % (css, name))
self.selenium.find_element(*_text_locator).click()
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