本文整理汇总了Python中pages.desktop.consumer_pages.base.Base.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Base.__init__方法的具体用法?Python Base.__init__怎么用?Python Base.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.desktop.consumer_pages.base.Base
的用法示例。
在下文中一共展示了Base.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
def __init__(self, base_url, selenium, app_name=None):
Base.__init__(self, base_url, selenium)
self.app_name = app_name
示例9: __init__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
def __init__(self, testsetup, element):
Base.__init__(self, testsetup)
self._root_element = element
示例10: __init__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
def __init__(self, testsetup, app_name=False):
Base.__init__(self, testsetup)
if app_name:
self._page_title = "%s | Mozilla Marketplace" % app_name
示例13: __init__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
def __init__(self, testsetup, app_name=None):
Base.__init__(self, testsetup)
self.app_name = app_name
示例14: __init__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
def __init__(self, base_url, selenium, element):
Base.__init__(self, base_url, selenium)
self._root_element = element
示例15: __init__
# 需要导入模块: from pages.desktop.consumer_pages.base import Base [as 别名]
# 或者: from pages.desktop.consumer_pages.base.Base import __init__ [as 别名]
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()