当前位置: 首页>>代码示例>>Python>>正文


Python base.Base类代码示例

本文整理汇总了Python中pages.base.Base的典型用法代码示例。如果您正苦于以下问题:Python Base类的具体用法?Python Base怎么用?Python Base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Base类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, mozwebqa, open_url=True):
     """
     Gets the base_url
     """
     Base.__init__(self, mozwebqa)
     if open_url:
         self.selenium.get(self.base_url)
开发者ID:eanxgeek,项目名称:katello_challenge,代码行数:7,代码来源:home.py

示例2: __init__

 def __init__(self, mozwebqa, open_url=True):
     ''' 
     Gets page ready for testing 
     '''
     Base.__init__(self, mozwebqa)
     if open_url:
         self.selenium.get(self.base_url)
开发者ID:aweiteka,项目名称:CloudForms.Auto,代码行数:7,代码来源:home.py

示例3: __init__

 def __init__(self, testsetup, addon_name=None):
     #formats name for url
     Base.__init__(self, testsetup)
     if (addon_name != None):
         self.addon_name = addon_name.replace(" ", "-")
         self.addon_name = re.sub(r'[^A-Za-z0-9\-]', '', self.addon_name).lower()
         self.addon_name = self.addon_name[:27]
         self.selenium.open("%s/addon/%s" % (self.site_version, self.addon_name))
         self.wait_for_element_present(self._reviews_locator)
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:9,代码来源:details.py

示例4: __init__

    def __init__(self, testsetup):
        Base.__init__(self, testsetup)

        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:bobsilverberg,项目名称:treeherder-tests,代码行数:9,代码来源:resultset.py

示例5: __init__

 def __init__(self, testsetup, index):
     Base.__init__(self, testsetup)
     self.index = index
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:3,代码来源:addons_site.py

示例6: __init__

 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     # Wait for the page to be populated
     WebDriverWait(self.selenium, self.timeout).until(
             lambda s: len(s.find_elements(*self._people_list_locator)))
开发者ID:AndreiH,项目名称:remo-tests,代码行数:5,代码来源:people.py

示例7: __init__

 def __init__(self, testsetup, open_url=True):
     """ Creates a new instance of the class and gets the page ready for testing """
     Base.__init__(self, testsetup)
     if open_url:
         self.selenium.get(self.base_url)
开发者ID:amitverma12,项目名称:Affiliates-Tests,代码行数:5,代码来源:start_page.py

示例8: __init__

 def __init__(self, testsetup, path):
     Base.__init__(self, testsetup)
     self.selenium.open("%s/%s" % (self.site_version, path))
     #resizing this page for elements that disappear when the window is < 1000
     self.selenium.get_eval("window.resizeTo(10000,10000); window.moveTo(0,0)")
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:5,代码来源:discovery.py

示例9: __init__

 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     WebDriverWait(self.selenium, self.timeout).until(
         lambda s: self.is_element_visible(*self._profile_photo_locator))
开发者ID:glogiotatidis,项目名称:mozillians-tests,代码行数:4,代码来源:profile.py

示例10: __init__

 def __init__(self, testsetup, open_url=True):
     Base.__init__(self, testsetup)
     if open_url:
         self.open('/')
     WebDriverWait(self.selenium, self.timeout).until(lambda s: s.find_element(*self._promo_box_locator))
开发者ID:AndreiH,项目名称:remo-tests,代码行数:5,代码来源:home.py

示例11: __init__

 def __init__(self, testsetup):
     ''' Creates a new instance of the class and gets the page ready for testing '''
     Base.__init__(self, testsetup)
     self.selenium.open("%s/" % self.site_version)
     self.selenium.window_maximize()
开发者ID:johnny-c,项目名称:Addon-Tests,代码行数:5,代码来源:home.py

示例12: __init__

 def __init__(self, testsetup, open_url=True):
     ''' Creates a new instance of the class and gets the page ready for testing '''
     Base.__init__(self, testsetup)
     if open_url:
         self.selenium.get("https://www.diresworb.org/")
开发者ID:AlinT,项目名称:BrowserID-Tests,代码行数:5,代码来源:home.py

示例13: __init__

 def __init__(self, testsetup, open_url=True):
     Base.__init__(self, testsetup)
     if open_url:
         self.selenium.get(self.base_url)
         self.maximize_window()
开发者ID:AndreiH,项目名称:mozillians-tests,代码行数:5,代码来源:home_page.py

示例14: __init__

 def __init__(self,setup):
     Base.__init__(self, setup)
开发者ID:jprovaznik,项目名称:cfme_pages,代码行数:2,代码来源:configuration.py

示例15: __init__

 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     self.wait_for_element_visible(*self._user_avatar_locator)
开发者ID:bitgeeky,项目名称:remo-tests,代码行数:3,代码来源:profile.py


注:本文中的pages.base.Base类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。