Esempio n. 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.",
            )
Esempio n. 2
0
 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.')
Esempio n. 3
0
        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))
Esempio n. 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}
Esempio n. 6
0
 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))
Esempio n. 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))
Esempio n. 9
0
 def __init__(self, testsetup, item_class=AccordionItem):
     '''
     Constructor
     '''
     Page.__init__(self, testsetup)
     self.item_class = item_class
Esempio n. 10
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
Esempio n. 11
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
Esempio n. 12
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.wait_for_element_visible(*self._region_select_locator)
Esempio n. 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')
Esempio n. 15
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
Esempio n. 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)
Esempio n. 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)
Esempio n. 20
0
 def __init__(self, base_url, selenium, element):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
Esempio n. 21
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
Esempio n. 22
0
 def __init__(self, testsetup, accordion_element):
     Page.__init__(self, testsetup)
     self._root_element = accordion_element
Esempio n. 23
0
 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')
Esempio n. 24
0
 def __init__(self, testsetup, quadicon_list_element):
     Page.__init__(self, testsetup)
     self._root_element = quadicon_list_element
Esempio n. 25
0
 def __init__(self, pageId, full, params={}, role=None):
     Page.__init__(self, pageId, params, role)
     self.full = full
Esempio n. 26
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
Esempio n. 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)
Esempio n. 28
0
 def __init__(self, testsetup, tabbutton_element):
     Page.__init__(self, testsetup)
     self._root_element = tabbutton_element
Esempio n. 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)
Esempio n. 31
0
 def __init__(self, base_url, selenium, element, menu):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
     self._menu = menu
Esempio n. 32
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
Esempio n. 33
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
     self.report = None
Esempio n. 34
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._root_element = self.selenium.find_element(*self._root_locator)
Esempio n. 35
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
Esempio n. 36
0
 def __init__(self, testsetup, breadcrumb_list_element):
     Page.__init__(self, testsetup)
     self._root_element = breadcrumb_list_element
Esempio n. 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)
Esempio n. 38
0
 def __init__(self, driver):
     Page.__init__(self, driver)
Esempio n. 39
0
 def __init__(self, testsetup, app):
     Page.__init__(self, testsetup)
     self.app = app
Esempio n. 40
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.sel = self.selenium
Esempio n. 41
0
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     self.lookup = lookup
Esempio n. 42
0
 def __init__(self, testsetup, item_class = STItem):
     Page.__init__(self, testsetup)
     self.item_class = item_class
Esempio n. 43
0
 def __init__(self, testsetup, root_element):
     Page.__init__(self, testsetup)
     self._root_element = root_element
Esempio n. 44
0
 def __init__(self, pageId, params={}, role=None):
     Page.__init__(self, pageId, params, role)