本文整理汇总了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)
示例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)
示例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)
示例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")
示例5: __init__
def __init__(self, testsetup, index):
Base.__init__(self, testsetup)
self.index = index
示例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)))
示例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)
示例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)")
示例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))
示例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))
示例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()
示例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/")
示例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()
示例14: __init__
def __init__(self,setup):
Base.__init__(self, setup)
示例15: __init__
def __init__(self, testsetup):
Base.__init__(self, testsetup)
self.wait_for_element_visible(*self._user_avatar_locator)