Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (19 sloc) 0.935 kb
#!/usr/bin/env python
# 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 base import BasePage
class WatchPage(BasePage):
_page_title = 'MozillaWiki'
_return_to_page_locator = (By.CSS_SELECTOR, '#ca-nstab-main > span > a')
_watchlist_message_locator = (By.CSS_SELECTOR, 'div#mw-notification-area > div > div > p')
@property
def return_to_page_visible(self):
return self.is_element_visible(self._return_to_page_locator)
def click_return_to_page(self):
self.selenium.find_element(*self._return_to_page_locator).click()
@property
def watchlist_message(self):
"""Return the message displayed."""
return self.selenium.find_element(*self._watchlist_message_locator).text
Jump to Line
Something went wrong with that request. Please try again.