open-bounty/test/end-to-end/pages/openbounty/activity.py

26 lines
923 B
Python
Raw Normal View History

2018-04-06 11:58:07 +00:00
from pages.base_page import BasePageObject
from pages.base_element import *
from tests import test_data
import logging
class ActivityDescription(BaseText):
def __init__(self, driver, status, issue_title):
super(ActivityDescription, self).__init__(driver)
self.locator = self.Locator.xpath_selector(
2018-04-09 10:07:41 +00:00
'//div[@class="description"]/div[contains(.,"%s")]/a[contains(.,"%s")]' % (status, issue_title))
2018-04-06 11:58:07 +00:00
class ActivityPage(BasePageObject):
def __init__(self, driver):
super(ActivityPage, self).__init__(driver)
self.driver = driver
def get_activity_page(self):
self.driver.get(test_data.config['Common']['url'] + 'app#/activity')
def check_activity_is_presented(self, status, issue_title):
2018-04-09 10:07:41 +00:00
logging.info('Check that activity "%s %s" is displayed' % (status, issue_title))
2018-04-06 11:58:07 +00:00
ActivityDescription(self.driver, status, issue_title).find_element()