Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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'
Exemplo n.º 4
0
 def __init__(self, testsetup, app_name=False):
     Base.__init__(self, testsetup)
     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
Exemplo n.º 5
0
 def __init__(self, testsetup, category_name):
     Base.__init__(self, testsetup)
     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)
Exemplo n.º 6
0
    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')
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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
Exemplo n.º 9
0
 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)
Exemplo n.º 10
0
    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')
Exemplo n.º 11
0
 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')
Exemplo n.º 12
0
 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)
Exemplo n.º 13
0
 def __init__(self, testsetup, app_name=False):
     Base.__init__(self, testsetup)
     self.wait_for_ajax_on_page_finish()
     if app_name:
         self._page_title = "Reviews for %s | Mozilla Marketplace" % app_name
Exemplo n.º 14
0
 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()
Exemplo n.º 15
0
 def __init__(self, testsetup, category_name):
     Base.__init__(self, testsetup)
     self._page_title = "%s | %s" % (category_name, self._page_title)
Exemplo n.º 16
0
 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)
Exemplo n.º 17
0
 def __init__(self, base_url, selenium, element):
     Base.__init__(self, base_url, selenium)
     self._root_element = element
Exemplo n.º 18
0
 def __init__(self, base_url, selenium, app_name=None):
     Base.__init__(self, base_url, selenium)
     self.wait_for_page_to_load()
     self.app_name = app_name
Exemplo n.º 19
0
 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)
Exemplo n.º 20
0
 def __init__(self, testsetup, app_name = False):
     Base.__init__(self, testsetup)
     self.wait_for_ajax_on_page_finish()
     if app_name:
         self._page_title = "Reviews for %s | Mozilla Marketplace" % app_name
Exemplo n.º 21
0
 def __init__(self, testsetup, app_name=False):
     Base.__init__(self, testsetup)
     self.wait_for_page_to_load()
     if app_name:
         self._page_title = "Reviews for %s | Firefox Marketplace" % app_name
Exemplo n.º 22
0
 def __init__(self, testsetup, element):
     Base.__init__(self, testsetup)
     self._root_element = element
Exemplo n.º 23
0
 def __init__(self, testsetup, app_name=None):
     Base.__init__(self, testsetup)
     self.app_name = app_name
Exemplo n.º 24
0
 def __init__(self, base_url, selenium, app_name=None):
     Base.__init__(self, base_url, selenium)
     self.app_name = app_name
Exemplo n.º 25
0
 def __init__(self, testsetup, app_name=None):
     Base.__init__(self, testsetup)
     Sorter.__init__(self, testsetup)
     self.app_name = app_name
Exemplo n.º 26
0
 def __init__(self, testsetup, element):
     Base.__init__(self, testsetup)
     self._root_element = element
Exemplo n.º 27
0
 def __init__(self, testsetup, app_name=False):
     Base.__init__(self, testsetup)
     if app_name:
         self._page_title = "Add a review for %s | Mozilla Marketplace" % app_name
Exemplo n.º 28
0
 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)
Exemplo n.º 29
0
 def __init__(self, testsetup):
     Base.__init__(self, testsetup)
     Sorter.__init__(self, testsetup)
     self.wait_for_element_present(*self._sorter_header_locator)
Exemplo n.º 30
0
 def __init__(self, testsetup, app_name=None):
     Base.__init__(self, testsetup)
     self.wait_for_page_to_load()
     self.app_name = app_name
Exemplo n.º 31
0
 def __init__(self, testsetup, category_name):
     Base.__init__(self, testsetup)
     self._page_title = "%s | %s" % (category_name, self._page_title)
     self.wait_for_page_to_load()
Exemplo n.º 32
0
 def __init__(self, testsetup, app_name=False):
     Base.__init__(self, testsetup)
     if app_name:
         self._page_title = "%s | Mozilla Marketplace" % app_name
Exemplo n.º 33
0
 def __init__(self, testsetup, search_term=False):
     Base.__init__(self, testsetup)
     if search_term:
         self._page_title = "%s | %s" % (search_term, self._page_title)
Exemplo n.º 34
0
 def __init__(self, testsetup, app_name=None):
     Base.__init__(self, testsetup)
     self.wait_for_page_to_load()
     self.app_name = app_name
Exemplo n.º 35
0
 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)