예제 #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.",
            )
예제 #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, 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))
예제 #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}
예제 #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, item_class=AccordionItem):
     '''
     Constructor
     '''
     Page.__init__(self, testsetup)
     self.item_class = item_class
예제 #10
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
예제 #11
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
예제 #12
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.wait_for_element_visible(*self._region_select_locator)
예제 #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')
예제 #15
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
예제 #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)
예제 #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)
예제 #20
0
 def __init__(self, base_url, selenium, element):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
예제 #21
0
 def __init__(self, testsetup, elment):
     Page.__init__(self, testsetup)
     self._root = elment
예제 #22
0
 def __init__(self, testsetup, accordion_element):
     Page.__init__(self, testsetup)
     self._root_element = accordion_element
예제 #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')
예제 #24
0
 def __init__(self, testsetup, quadicon_list_element):
     Page.__init__(self, testsetup)
     self._root_element = quadicon_list_element
예제 #25
0
 def __init__(self, pageId, full, params={}, role=None):
     Page.__init__(self, pageId, params, role)
     self.full = full
예제 #26
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
예제 #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)
예제 #28
0
 def __init__(self, testsetup, tabbutton_element):
     Page.__init__(self, testsetup)
     self._root_element = tabbutton_element
예제 #29
0
파일: button.py 프로젝트: akarol/cfme_pages
 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)
예제 #31
0
 def __init__(self, base_url, selenium, element, menu):
     Page.__init__(self, base_url, selenium)
     self._root_element = element
     self._menu = menu
예제 #32
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._sorter = self.selenium.find_element(*self._sorter_base_locator)
예제 #33
0
 def __init__(self, pageId, params={}):
     Page.__init__(self, pageId, params)
     self.report = None
예제 #34
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self._root_element = self.selenium.find_element(*self._root_locator)
예제 #35
0
 def __init__(self, testsetup, element, menu):
     Page.__init__(self, testsetup)
     self._root_element = element
     self._menu = menu
예제 #36
0
 def __init__(self, testsetup, breadcrumb_list_element):
     Page.__init__(self, testsetup)
     self._root_element = breadcrumb_list_element
예제 #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)
예제 #38
0
 def __init__(self, driver):
     Page.__init__(self, driver)
예제 #39
0
 def __init__(self, testsetup, app):
     Page.__init__(self, testsetup)
     self.app = app
예제 #40
0
 def __init__(self, testsetup):
     Page.__init__(self, testsetup)
     self.sel = self.selenium
예제 #41
0
파일: base.py 프로젝트: jsj0809/Addon-Tests
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     self.lookup = lookup
예제 #42
0
 def __init__(self, testsetup, item_class = STItem):
     Page.__init__(self, testsetup)
     self.item_class = item_class
예제 #43
0
 def __init__(self, testsetup, root_element):
     Page.__init__(self, testsetup)
     self._root_element = root_element
예제 #44
0
 def __init__(self, pageId, params={}, role=None):
     Page.__init__(self, pageId, params, role)