本文整理匯總了Python中pages.desktop.consumer_pages.base.Base類的典型用法代碼示例。如果您正苦於以下問題:Python Base類的具體用法?Python Base怎麽用?Python Base使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Base類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
def __init__(self, testsetup, app_name=False):
Base.__init__(self, testsetup)
if app_name:
self._page_title = "%s | Firefox Marketplace" % app_name
self.app_name = app_name
else:
self._page_title = "%s | Firefox Marketplace" % self.title
示例2: __init__
def __init__(self, testsetup, app_name=False):
Base.__init__(self, testsetup)
self.wait_for_ajax_on_page_finish()
if app_name:
self._page_title = "%s | Firefox Marketplace" % app_name
self.app_name = app_name
else:
self._page_title = "%s | Firefox Marketplace" % self.title
示例3: __init__
def __init__(self, base_url, selenium):
Base.__init__(self, base_url, selenium)
if self.selenium.title != self._page_title:
for handle in self.selenium.window_handles:
self.selenium.switch_to_window(handle)
WebDriverWait(self.selenium, self.timeout).until(lambda s: s.title)
else:
raise Exception('Page has not loaded')
示例4: __init__
def __init__(self, testsetup, app_name=False):
Base.__init__(self, testsetup)
Sorter.__init__(self, testsetup)
if app_name:
self._page_title = '%s | Firefox Marketplace' % app_name
self.app_name = app_name
else:
self._page_title = 'Search Results | Firefox Marketplace'
self.wait_for_element_present(*self._search_results_section_locator)
示例5: __init__
def __init__(self, testsetup, app_name=False, first_access=False):
Base.__init__(self, testsetup)
if first_access:
self.wait_for_page_to_load()
if app_name:
self._page_title = "%s | Firefox Marketplace" % app_name
self.app_name = app_name
else:
self._page_title = "%s | Firefox Marketplace" % self.title
示例6: __init__
def __init__(self, testsetup):
Base.__init__(self, testsetup)
self._main_window_handle = self.selenium.current_window_handle
for handle in self.selenium.window_handles:
self.selenium.switch_to.window(handle)
# wait a bit for window ready
time.sleep(2)
if self.is_element_present(*self._email_input_locator):
self.wait_for_element_visible(*self._email_input_locator)
self._sign_in_window_handle = handle
break
else:
raise Exception('Popup has not loaded')
示例7: __init__
def __init__(self, base_url, selenium, category_name):
Base.__init__(self, base_url, selenium)
self.wait_for_page_to_load()
WebDriverWait(self.selenium, self.timeout).until(lambda s: category_name.title() == self.category_title)
WebDriverWait(self.selenium, self.timeout).until(lambda s: len(self.apps) > 0)
self._page_title = "%s | %s" % (category_name.title(), self._page_title)
示例8: __init__
def __init__(self, base_url, selenium, app_name=None):
Base.__init__(self, base_url, selenium)
self.app_name = app_name
示例9: __init__
def __init__(self, testsetup, element):
Base.__init__(self, testsetup)
self._root_element = element
示例10: __init__
def __init__(self, testsetup, category_name):
Base.__init__(self, testsetup)
self._page_title = "%s | %s" % (category_name.title(), self._page_title)
WebDriverWait(self.selenium, self.timeout).until(lambda s: len(self.apps_count) > 0)
示例11: __init__
def __init__(self, testsetup, search_term=False):
Base.__init__(self, testsetup)
Sorter.__init__(self, testsetup)
if search_term and search_term is not "":
self._page_title = "%s | %s" % (search_term, self._page_title)
示例12: __init__
def __init__(self, testsetup, app_name=False):
Base.__init__(self, testsetup)
if app_name:
self._page_title = "%s | Mozilla Marketplace" % app_name
示例13: __init__
def __init__(self, testsetup, app_name=None):
Base.__init__(self, testsetup)
self.app_name = app_name
示例14: __init__
def __init__(self, base_url, selenium, element):
Base.__init__(self, base_url, selenium)
self._root_element = element
示例15: __init__
def __init__(self, testsetup, category_name):
Base.__init__(self, testsetup)
self._page_title = "%s | %s" % (category_name, self._page_title)
self.wait_for_ajax_on_page_finish()