예제 #1
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))
예제 #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.')
예제 #3
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
예제 #4
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, 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}
예제 #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))
예제 #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')
예제 #8
0
        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))
예제 #9
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.sel = self.selenium
예제 #10
0
 def __init__(self, driver):
     Page.__init__(self, driver, 'Secure area page')
     self.add_trait(self._has_logout_button, 'has logout button')
 def __init__(self, base_url, selenium, column):
     Page.__init__(self, base_url, selenium)
     self._root_element = column
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
예제 #13
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
예제 #14
0
 def __init__(self, driver):
     Page.__init__(self, driver, 'Login page')
     self.add_trait(self._has_username_input, 'has username')
     self.add_trait(self._has_password_input, 'has password')
     self.add_trait(self._has_submit_button, 'has submit button')
 def __init__(self, selenium_driver):
   Page.__init__(self, selenium_driver, 'https://saucelabs.com/test/guinea-pig')
예제 #16
0
 def __init__(self, testsetup, locator_override=None, cls=TabButtonItem):
     Page.__init__(self, testsetup)
     if locator_override is not None:
         self._button_locator = locator_override
     self._item_cls = cls
예제 #17
0
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     Wait(self.selenium,
          self.timeout).until(expected.window_with_title('Log for'))
예제 #18
0
 def __init__(self, testsetup, open_url=True):
     """ Creates a new instance of the class and gets the page ready for testing """
     Page.__init__(self, testsetup)
     if open_url:
         self.selenium.get(self.base_url)
예제 #19
0
 def __init__(self, testsetup, category_element):
     Page.__init__(self, testsetup)
     self._root_element = category_element
 def __init__(self, base_url, selenium):
     Page.__init__(self, base_url, selenium)
     WebDriverWait(self.selenium, self.timeout).until(
         lambda s: self.is_element_visible(None, *self._input_locator))
 def __init__(self, base_url, selenium, row):
     Page.__init__(self, base_url, selenium)
     self._root_element = row
예제 #22
0
 def __init__(self, testsetup, item_class = STItem):
     Page.__init__(self, testsetup)
     self.item_class = item_class
예제 #23
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
예제 #24
0
 def __init__(self, base_url, selenium, web_element):
     Page.__init__(self, base_url, selenium)
     self._root_element = web_element
예제 #25
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
예제 #26
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')
예제 #27
0
 def __init__(self,setup):
     Page.__init__(self, setup)
예제 #28
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
예제 #29
0
 def __init__(self, testsetup, tabbutton_element):
     Page.__init__(self, testsetup)
     self._root_element = tabbutton_element
예제 #30
0
 def __init__(self, testsetup, root, cls):
     Page.__init__(self, testsetup, root)
     self._item_cls = cls
예제 #31
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
예제 #32
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     # Wait for the first category to be visible
     element = self.selenium.find_element(*self._category_item_locator)
     WebDriverWait(self.selenium,
                   self.timeout).until(lambda s: element.is_displayed())
예제 #33
0
 def __init__(self, testsetup, web_element):
     Page.__init__(self, testsetup)
     self._root_element = web_element
예제 #34
0
 def __init__(self, setup, root_element):
     Page.__init__(self, setup)
     self._root_element = root_element
예제 #35
0
 def __init__(self, driver):
     Page.__init__(self, driver)
예제 #36
0
 def __init__(self, testsetup, open_url=True):
     ''' Creates a new instance of the class and gets the page ready for testing '''
     Page.__init__(self, testsetup)
     if open_url:
         self.selenium.get("https://addons-dev.allizom.org/")
예제 #37
0
파일: base.py 프로젝트: jsj0809/Addon-Tests
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     self.lookup = lookup
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
예제 #39
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')
예제 #40
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.wait_for_element_visible(*self._region_select_locator)
예제 #41
0
 def __init__(self, pageId, full, params={}, role=None):
     Page.__init__(self, pageId, params, role)
     self.full = full
예제 #42
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.selenium.switch_to_window(self._pop_up_id)
예제 #43
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)
예제 #44
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
예제 #45
0
파일: button.py 프로젝트: akarol/cfme_pages
 def __init__(self,setup,*element):
     Page.__init__(self,setup)
     self._root_element = self.selenium.find_element(*element)
예제 #46
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
     self.report = None
예제 #47
0
 def __init__(self, base_url, selenium, element, menu):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
     self._menu = menu
예제 #48
0
 def __init__(self, base_url, selenium, element, menu):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
     self._menu = menu
예제 #49
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
     self.report = None
예제 #50
0
 def __init__(self, testsetup, row):
     Page.__init__(self, testsetup)
     self._root_element = row
예제 #51
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
예제 #52
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._root_element = self.selenium.find_element(*self._root_locator)
예제 #53
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)
예제 #54
0
 def __init__(self, testsetup, quadicon_list_element):
     Page.__init__(self, testsetup)
     self._root_element = quadicon_list_element
예제 #55
0
 def __init__(self, testsetup, app):
     Page.__init__(self, testsetup)
     self.app = app
예제 #56
0
 def __init__(self, testsetup, lookup):
         Page.__init__(self, testsetup)
         self.lookup = lookup
예제 #57
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._root_element = self.selenium.find_element(
         *self._root_locator)
예제 #58
0
 def __init__(self, driver):
     Page.__init__(self, driver)
예제 #59
0
 def __init__(self, testsetup, root_element):
     Page.__init__(self, testsetup)
     self._root_element = root_element
예제 #60
0
 def __init__(self, testsetup, tabbutton_element):
     Page.__init__(self, testsetup)
     self._root_element = tabbutton_element