Exemple #1
0
        def __init__(self, testsetup):
            Page.__init__(self, testsetup)

            WebDriverWait(self.selenium, self.timeout).until(
                lambda s: s.find_element(*self._make_contribution_button_locator),
                "Timeout waiting for 'make contribution' button.",
            )
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.selenium.switch_to_frame(self._iframe_id)
     # wait for the paypal logo to appear, then we know the frame's contents has loaded
     WebDriverWait(self.selenium, self.timeout).until(
         lambda s: s.find_element(*self._logo_locator),
         'Timeout waiting for Paypal logo in frame.')
        def __init__(self, testsetup, lookup):
            Page.__init__(self, testsetup)

            # expand the thing here to represent the proper user action
            self._root_element = self.selenium.find_element(
                self._base_locator[0],
                "%s/ul/li/a[normalize-space(text())='%s']" % (self._base_locator[1], lookup))
Exemple #4
0
 def __init__(self, testsetup, locator_override=None, active_override=None, cls=TabButtonItem):
     Page.__init__(self, testsetup)
     if locator_override is not None:
         self._button_locator = locator_override
     if active_override is not None:
         self._active_tab_locator = active_override
     self._item_cls = cls
 def __init__(self, driver):
     Page.__init__(self, driver)
     self.SELECT_FUNC = {WORD: self.configure_word_type_question,
                NUMBER: self.configure_number_type_question,
                DATE: self.configure_date_type_question,
                LIST_OF_CHOICES: self.configure_list_of_choices_type_question,
                GEO: self.configure_geo_type_question}
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     # expand the thing here to represent the proper user action
     is_expanded = self.selenium.find_element(*self._all_tags_locator).get_attribute('class')
     if ('active' not in is_expanded):
         self.selenium.find_element(*self._all_tags_locator).click()
     self._root_element = self.selenium.find_element(self._base_locator[0],
                             "%s[a[contains(@data-params, '%s')]]" % (self._base_locator[1], lookup))
Exemple #7
0
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     frame = self.wait.until(
         expected.presence_of_element_located(self._frame_locator),
         'PayPal frame is not present')
     self.selenium.switch_to_frame(frame)
     # wait for the paypal logo to appear, then we know the frame's contents has loaded
     self.wait.until(
         expected.visibility_of_element_located(self._logo_locator),
         'PayPal logo is not displayed')
        def __init__(self, testsetup, lookup):
            Page.__init__(self, testsetup)

            if lookup in FilterTags.category:
                all_tags_element = self.selenium.find_elements(*self._all_tags_locator)[0]
            elif lookup in FilterTags.price:
                all_tags_element = self.selenium.find_elements(*self._all_tags_locator)[1]
            elif lookup in FilterTags.device_type:
                all_tags_element = self.selenium.find_elements(*self._all_tags_locator)[2]

            # expand the thing here to represent the proper user action
            is_expanded = all_tags_element.get_attribute('class')
            if ('active' not in is_expanded):
                all_tags_element.click()
            self._root_element = self.selenium.find_element(self._base_locator[0],
                                    "%s/ul/li/a[normalize-space(text())='%s']" % (self._base_locator[1], lookup))
Exemple #9
0
 def __init__(self, testsetup, item_class=AccordionItem):
     '''
     Constructor
     '''
     Page.__init__(self, testsetup)
     self.item_class = item_class
Exemple #10
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
Exemple #11
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
Exemple #12
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.wait_for_element_visible(*self._region_select_locator)
Exemple #13
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
 def __init__(self, selenium_driver):
   Page.__init__(self, selenium_driver, 'https://saucelabs.com/test/guinea-pig')
Exemple #15
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
Exemple #16
0
 def __init__(self, testsetup, web_element):
     Page.__init__(self, testsetup)
     self._root_element = web_element
 def __init__(self, driver):
     Page.__init__(self, driver)
Exemple #18
0
 def __init__(self, driver):
     Page.__init__(self, driver)
     self.submit_answer_for = {TEXT : self.type_text, SELECT: self.select_option, CHECKBOX: self.select_checkbox}
 def setUp(self):
     browser = BrowserEngine(self)
     self.driver = browser.open_browser(self)
     self.page = Page(self.driver)
Exemple #20
0
 def __init__(self, base_url, selenium, element):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
Exemple #21
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
Exemple #22
0
 def __init__(self, testsetup, accordion_element):
     Page.__init__(self, testsetup)
     self._root_element = accordion_element
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     self.wait.until(expected.visibility_of_element_located(
         self._make_contribution_button_locator),
         'Make Contribution button is not displayed')
Exemple #24
0
 def __init__(self, testsetup, quadicon_list_element):
     Page.__init__(self, testsetup)
     self._root_element = quadicon_list_element
Exemple #25
0
 def __init__(self, pageId, full, params={}, role=None):
     Page.__init__(self, pageId, params, role)
     self.full = full
Exemple #26
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
Exemple #27
0
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     WebDriverWait(self.selenium, self.timeout).until(
         lambda s: self.is_element_visible(*self._modal_locator))
     self._root_element = self.selenium.find_element(*self._modal_locator)
 def __init__(self, testsetup, tabbutton_element):
     Page.__init__(self, testsetup)
     self._root_element = tabbutton_element
Exemple #29
0
 def __init__(self,setup,*element):
     Page.__init__(self,setup)
     self._root_element = self.selenium.find_element(*element)
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
 def __init__(self, base_url, selenium, element, menu):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
     self._menu = menu
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
Exemple #33
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
     self.report = None
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._root_element = self.selenium.find_element(*self._root_locator)
Exemple #35
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
Exemple #36
0
 def __init__(self, testsetup, breadcrumb_list_element):
     Page.__init__(self, testsetup)
     self._root_element = breadcrumb_list_element
Exemple #37
0
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     # expand the thing here to represent the proper user action
     self._root_locator = self._base_locator + self._item % lookup
     if not self.selenium.is_visible(self._root_locator + self._item_link):
         self.selenium.click(self._base_locator)
 def __init__(self, driver):
     Page.__init__(self, driver)
 def __init__(self, testsetup, app):
     Page.__init__(self, testsetup)
     self.app = app
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.sel = self.selenium
Exemple #41
0
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     self.lookup = lookup
Exemple #42
0
 def __init__(self, testsetup, item_class = STItem):
     Page.__init__(self, testsetup)
     self.item_class = item_class
 def __init__(self, testsetup, root_element):
     Page.__init__(self, testsetup)
     self._root_element = root_element
Exemple #44
0
 def __init__(self, pageId, params={}, role=None):
     Page.__init__(self, pageId, params, role)