def __init__(self, mozwebqa, open_url=True): """ Gets the base_url """ Base.__init__(self, mozwebqa) if open_url: self.selenium.get(self.base_url)
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)
def __init__(self, base_url, selenium, open_url=True): Base.__init__(self, base_url, selenium) if open_url: self.selenium.get(self.base_url) self._sign_in_button = (By.CSS_SELECTOR, 'a[href="{}"]'.format(self.base_url)) self._logout_button_locator = (By.CSS_SELECTOR, '#main-content a[href="/logout"]')
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)
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")
def __init__(self, testsetup): Base.__init__(self, testsetup) WebDriverWait(self.selenium, self.timeout).until( lambda s: self.is_element_visible(*self._profile_photo_locator))
def __init__(self, testsetup): Base.__init__(self, testsetup) self.wait_for_element_visible(*self._faq_sidebar)
def __init__(self, base_url, selenium, open_url=True): Base.__init__(self, base_url, selenium) if open_url: self.selenium.get(self.base_url)
def __init__(self, testsetup): Base.__init__(self, testsetup) WebDriverWait(self.selenium, self.timeout).until( lambda s: self.is_element_visible(*self._profile_photo_locator))
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)")
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)))
def __init__(self, testsetup, open_url=True): Base.__init__(self, testsetup) if open_url: self.selenium.get(self.base_url)
def __init__(self, setup): Base.__init__(self, setup)
def __init__(self,setup): Base.__init__(self, setup)
def __init__(self, testsetup): Base.__init__(self, testsetup) self.wait_for_element_visible(*self._faq_sidebar)
def __init__(self, base_url, selenium): Base.__init__(self, base_url, selenium) self.wait_for_page_loaded() WebDriverWait(self.selenium, self.timeout).until( lambda s: self.is_element_visible(*self._profile_photo_locator))
def __init__(self, testsetup, open_url=True): Base.__init__(self, testsetup) self.maximize_window() if open_url: self.selenium.get(self.base_url)
def __init__(self, testsetup, open_url=True): Base.__init__(self, testsetup) if open_url: self.selenium.get(self.base_url) self.maximize_window()
def __init__(self, testsetup, open_url=True): Base.__init__(self, testsetup) if open_url: self.selenium.get(self.base_url)
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)
def __init__(self, testsetup, open_url=True): Base.__init__(self, testsetup) if open_url: self.open('/')
def __init__(self, base_url, selenium, open_url=True): Base.__init__(self, base_url, selenium) if open_url: self.selenium.get("https://sso.mozilla.com")
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/")
def __init__(self, testsetup): Base.__init__(self, testsetup) self.wait_for_element_visible(*self._user_avatar_locator)
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)))
def __init__(self, testsetup, open_url=True): Base.__init__(self, testsetup) if open_url: self.selenium.get(self.base_url) WebDriverWait(self.selenium, self.timeout).until( lambda s: s.find_element(*self._promo_box_locator))
def __init__(self, testsetup, index): Base.__init__(self, testsetup) self.index = index
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/")
def __init__(self, testsetup): Base.__init__(self, testsetup) self.wait_for_element_visible(*self._user_avatar_locator)
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()
def __init__(self, base_url, selenium, open_url=True): """Creates a new instance of the class and gets the page ready for testing.""" Base.__init__(self, base_url, selenium, open_url)
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))
def __init__(self, base_url, selenium): Base.__init__(self, base_url, selenium) WebDriverWait( self.selenium, self.timeout).until(lambda s: self.is_no_results_present or len( s.find_elements(*self._results_locator)) > 0)
def __init__(self, testsetup): Base.__init__(self, testsetup)
def __init__(self, base_url, selenium, open_url=True): Base.__init__(self, base_url, selenium) if open_url: self.selenium.get(self.base_url)
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.open('/')