Example #1
0
 def __init__(self, mozwebqa, open_url=True):
     """
     Gets the base_url
     """
     Base.__init__(self, mozwebqa)
     if open_url:
         self.selenium.get(self.base_url)
Example #2
0
 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)
Example #3
0
 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"]')
Example #4
0
 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))
Example #7
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     self.wait_for_element_visible(*self._faq_sidebar)
Example #8
0
 def __init__(self, base_url, selenium, open_url=True):
     Base.__init__(self, base_url, selenium)
     if open_url:
         self.selenium.get(self.base_url)
Example #9
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     WebDriverWait(self.selenium, self.timeout).until(
         lambda s: self.is_element_visible(*self._profile_photo_locator))
Example #10
0
 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)")
Example #11
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)))
Example #12
0
 def __init__(self, testsetup, open_url=True):
     Base.__init__(self, testsetup)
     if open_url:
         self.selenium.get(self.base_url)
Example #13
0
 def __init__(self, setup):
     Base.__init__(self, setup)
Example #14
0
 def __init__(self,setup):
     Base.__init__(self, setup)
Example #15
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     self.wait_for_element_visible(*self._faq_sidebar)
Example #16
0
 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))
Example #17
0
 def __init__(self, testsetup, open_url=True):
     Base.__init__(self, testsetup)
     self.maximize_window()
     if open_url:
         self.selenium.get(self.base_url)
Example #18
0
 def __init__(self, testsetup, open_url=True):
     Base.__init__(self, testsetup)
     if open_url:
         self.selenium.get(self.base_url)
         self.maximize_window()
Example #19
0
 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)
Example #21
0
 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")
Example #23
0
 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/")
Example #24
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     self.wait_for_element_visible(*self._user_avatar_locator)
Example #25
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)))
Example #26
0
 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))
Example #27
0
 def __init__(self, testsetup, index):
     Base.__init__(self, testsetup)
     self.index = index
Example #28
0
 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/")
Example #29
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     self.wait_for_element_visible(*self._user_avatar_locator)
Example #30
0
 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)
Example #32
0
 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))
Example #33
0
 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)
Example #34
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
Example #35
0
 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('/')