Ejemplo n.º 1
0
    def find_all(self, *args, **kwargs):
        """Find all WebElements that match the search criteria.

        Search criteria:
        The first argument must be: an element tuple, a CSS string or
        a WebElement object.
        Keyword search criteria: id, name, link_text, partial_link_text,
        css, xpath, tag_name.
        Only one search criteria should be provided.

        :Usage:
            element.find_all('div#someId > span.class')
            element.find(('tag_name', 'input'))
            element.find(xpath='//div/input')

        :Returns:
            a list of ExtendedRemoteWebElement
        """
        if len(args) == 1:
            kwargs['element'] = args[0]
        return _find_all(self, **kwargs)
Ejemplo n.º 2
0
    def find_all(self, element=None, id=None, name=None, link_text=None,
                 partial_link_text=None, css=None, xpath=None,
                 tag_name=None) -> List[ExtendedRemoteWebElement]:
        """Find all WebElements that match the search criteria.

        Search criteria:
        The first argument must be: an element tuple, a CSS string, or
        an XPath string.
        Keyword search criteria: id, name, link_text, partial_link_text,
        css, xpath, tag_name.
        Only one search criteria should be provided.

        :Usage:
            driver.find_all('div#someId > span.class')
            driver.find(('tag_name', 'input'))
            driver.find(xpath='//div/input')

        :Returns:
            a list of ExtendedRemoteWebElement
        """
        return common._find_all(self, element, id, name, link_text, partial_link_text,
                                css, xpath, tag_name)
Ejemplo n.º 3
0
 def find_all(self, *args, **kwargs):
     if len(args) == 1:
         kwargs['element'] = args[0]
     return common._find_all(self, **kwargs)