Beispiel #1
0
    def click_on_tab(self, name):
        css_sel = 'nav.primary-sidebar li a'
        err_msg = '{} btn in {} not found'.format(name, self)
        btn = find_web_elem_with_text(self.web_elem, css_sel,
                                      name.lower(), err_msg)

        err_msg = 'cannot click on {} in {}'.format(name, self)
        click_on_web_elem(self.web_elem, btn, err_msg)
Beispiel #2
0
    def click_on_tab(self, name):
        css_sel = 'nav.primary-sidebar li a'
        err_msg = '{} btn in {} not found'.format(name, self)
        btn = find_web_elem_with_text(self.web_elem, css_sel, name.lower(),
                                      err_msg)

        err_msg = 'cannot click on {} in {}'.format(name, self)
        click_on_web_elem(self.web_elem, btn, err_msg)
Beispiel #3
0
    def __get__(self, instance, owner):
        if instance is None:
            return self

        msg = self.item_not_found_msg
        return find_web_elem_with_text(instance.web_elem, self.css_sel,
                                       self._text,
                                       lambda: self._format_msg(msg, instance))
Beispiel #4
0
 def _get_btn(self, name):
     css_sel = '.save-metadata-row button'
     err_msg = '{} btn not found in metadata row'.format(name)
     btn = find_web_elem_with_text(self.web_elem, css_sel, name, err_msg)
     return ButtonWebObject(self.driver, btn, self)
 def _get_btn(self, name):
     css_sel = 'ul.space-dropdown-menu li.clickable'
     return find_web_elem_with_text(
         self.web_elem, css_sel, name, 'no button named {btn} found in '
         '{item}'.format(btn=name, item=self))
Beispiel #6
0
 def _get_btn(self, name):
     css_sel = '.save-metadata-row button'
     err_msg = '{} btn not found in metadata row'.format(name)
     btn = find_web_elem_with_text(self.web_elem, css_sel, name, err_msg)
     return ButtonWebObject(self.driver, btn, self)