status-react/test/appium/views/discover.py

29 lines
773 B
Python
Raw Normal View History

from views.base_view import BaseViewObject
import time
from views.base_element import *
class AllRecent(BaseButton):
def __init__(self, driver):
super(AllRecent, self).__init__(driver)
self.locator = self.Locator.xpath_selector("//*[@text='Recent statuses']/..//*[@text='ALL']")
class AllPopular(BaseButton):
def __init__(self, driver):
super(AllPopular, self).__init__(driver)
self.locator = self.Locator.xpath_selector("//*[@text='Popular #hashtags']/..//*[@text='ALL']")
class DiscoverView(BaseViewObject):
def __init__(self, driver):
super(DiscoverView, self).__init__(driver)
self.driver = driver
self.all_popular = AllPopular(self.driver)
self.all_recent = AllRecent(self.driver)