當前位置: 首頁>>代碼示例>>Python>>正文


Python base.Base類代碼示例

本文整理匯總了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
開發者ID:viorelaioia,項目名稱:marketplace-tests,代碼行數:7,代碼來源:details.py

示例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
開發者ID:yoshiyokotani,項目名稱:marketplace-tests,代碼行數:8,代碼來源:details.py

示例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')
開發者ID:diox,項目名稱:marketplace-tests,代碼行數:9,代碼來源:payment_popup.py

示例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)
開發者ID:AlinT,項目名稱:marketplace-tests,代碼行數:9,代碼來源:search.py

示例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
開發者ID:AndreiH,項目名稱:marketplace-tests,代碼行數:9,代碼來源:details.py

示例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')
開發者ID:AndreiH,項目名稱:marketplace-tests,代碼行數:13,代碼來源:fxa.py

示例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)
開發者ID:davehunt,項目名稱:marketplace-tests,代碼行數:6,代碼來源:category.py

示例8: __init__

 def __init__(self, base_url, selenium, app_name=None):
     Base.__init__(self, base_url, selenium)
     self.app_name = app_name
開發者ID:davehunt,項目名稱:marketplace-tests,代碼行數:3,代碼來源:search.py

示例9: __init__

 def __init__(self, testsetup, element):
     Base.__init__(self, testsetup)
     self._root_element = element
開發者ID:AlinT,項目名稱:marketplace-tests,代碼行數:3,代碼來源:reviews.py

示例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)
開發者ID:udeepak,項目名稱:marketplace-tests,代碼行數:4,代碼來源:category.py

示例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)
開發者ID:ajalgaonkar,項目名稱:marketplace-tests,代碼行數:5,代碼來源:search.py

示例12: __init__

 def __init__(self, testsetup, app_name=False):
     Base.__init__(self, testsetup)
     if app_name:
         self._page_title = "%s | Mozilla Marketplace" % app_name
開發者ID:fadyboy,項目名稱:marketplace-tests,代碼行數:4,代碼來源:details.py

示例13: __init__

 def __init__(self, testsetup, app_name=None):
     Base.__init__(self, testsetup)
     self.app_name = app_name
開發者ID:ithompson4,項目名稱:marketplace-tests,代碼行數:3,代碼來源:search.py

示例14: __init__

 def __init__(self, base_url, selenium, element):
     Base.__init__(self, base_url, selenium)
     self._root_element = element
開發者ID:davehunt,項目名稱:marketplace-tests,代碼行數:3,代碼來源:reviews.py

示例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()
開發者ID:bebef1987,項目名稱:marketplace-tests,代碼行數:4,代碼來源:category.py


注:本文中的pages.desktop.consumer_pages.base.Base類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。