Find all elements
@example
findAll('a') => [].slice.call(document.querySelectorAll('a'))
findAll(nav, 'a') => [].slice.call(nav.querySelectorAll('a'))
327146
function findAll (el, node) {
  return [].slice.call(node ? el.querySelectorAll(node) : $.querySelectorAll(el))
}
614682
function query (el) {
  if (typeof el === 'string') {
    const selected = document.querySelector(el);
    if (!selected) {
      warn(
        'Cannot find element: ' + el
      );
      return document.createElement('div')
    }
    return selected
  } else {
    return el
  }
}
297985
function(selector) {
        var nodelist = Y.all(Y.Selector.query(selector, this._node));
        nodelist._query = selector;
        nodelist._queryRoot = this._node;
        return nodelist;
    }
260589
def find_elements(self):
        
        es = []
        for element_id in self.find_element_ids():
            e = Element(self.http.new_client(''), element_id)
            es.append(e)
        return es
1043952
function matches(elem, selector) {
  // We'll use querySelectorAll to find all element matching the selector,
  // then check if the given element is included in that list.
  // Executing the query on the parentNode reduces the resulting nodeList,
  // document doesn't have a parentNode, though.
  var nodeList = ( elem.parentNode || document ).querySelectorAll( selector ) || [],
      i = nodeList.length;

  // loop on the nodeList
  while ( i-- ) {
    if ( nodeList[i] == elem ) { return true; }
  }
  return false;
}
127774
def all_as_href(self):
        
        if not self.is_any and not self.is_none:
            return [element for element in self.get(self.typeof)]
        return []
995778
def find_all(name, version = nil)
      matched = []
      find(name, version) {|p| matched << p }
      matched
    end
172843
public List<WebElement> findAll() {
		checkState(webDriver != null, "No WebDriver specified.");
		checkState(by != null, "No By instance for locating elements specified.");

		log.info(toString());

		final List<WebElement> result = newArrayList();

		try {
			if (timeoutSeconds > 0L) {
				WebDriverWait wait = createWebDriverWait();
				wait.until(new Function<WebDriver, List<WebElement>>() {
					@Override
					public List<WebElement> apply(final WebDriver input) {
						doFindElements(result, input);
						if (result.isEmpty()) {
							// this means, we try again until the timeout occurs
							throw new WebElementException("No matching element found.");
						}
						return result;
					}

					@Override
					public String toString() {
						return WebElementFinder.this.toString();
					}
				});
			} else {
				doFindElements(result, webDriver);
			}
			return result;
		} catch (TimeoutException ex) {
			Throwable cause = ex.getCause();
			for (Class<? extends Throwable> thClass : IGNORED_EXCEPTIONS) {
				if (thClass.isInstance(cause)) {
					return ImmutableList.of();
				}
			}
			throw new WebElementException(ex);
		}
	}
2123
function children(selector) {
  var arr = [], slice = this.slice, nodes, matches;
  this.each(function(el) {
    nodes = slice.call(el.childNodes);
    // only include elements
    nodes = nodes.filter(function(n) {
      if(n instanceof Element) { return n;}
    })
    // filter direct descendants by selector
    if(selector) {
      matches = slice.call(el.querySelectorAll(selector));
      for(var i = 0;i < nodes.length;i++) {
        if(~matches.indexOf(nodes[i])) {
          arr.push(nodes[i]);
        }
      }
    // get all direct descendants
    }else{
      arr = arr.concat(nodes);
    }
  });
  return this.air(arr);
}
937186
function (selector) {
            var nodes = [];
            if (vQ.isFunction(selector) && selector.call !== undefined) {
                this.each(function (idx) {
                    if (!selector.call(this, idx)) nodes.push(this);
                });
            } else {
                var excludes = typeof selector == 'string' ?
                    this.filter(selector) : (vQ.isArrayLike(selector) && vQ.isFunction(selector.item)) ? slice.call(selector) : vQ(selector);
                this.each(function (inx, el) {
                    if (excludes.indexOf(el) < 0){
                        nodes.push(el);
                    }
                });
            }
            return vQ(nodes);
        }
926877
function find(el, selector) {
  if (!selector) {
    selector = el;
    el = document;
  }
  return el.querySelector(selector);
}
336329
public function findAll($selector, $function, $arguments = array())
    {
        if (!$this->parser) {
            return;
        }

        $nodes = $this->parser->find($selector);

        if (!$nodes) {
            return;
        }

        if (!is_array($arguments)) {
            $arguments = array($arguments);
        }

        $results = array();

        foreach ($nodes as $node) {
            $results[] = call_user_func_array(array($node, $function), $arguments);
        }

        return $results;
    }
1115704
def find_elements(self, by=By.ID, value=None):
        
        if self.w3c:
            if by == By.ID:
                by = By.CSS_SELECTOR
                value = '[id="%s"]' % value
            elif by == By.TAG_NAME:
                by = By.CSS_SELECTOR
            elif by == By.CLASS_NAME:
                by = By.CSS_SELECTOR
                value = ".%s" % value
            elif by == By.NAME:
                by = By.CSS_SELECTOR
                value = '[name="%s"]' % value

        # Return empty list if driver returns null
        # See https://github.com/SeleniumHQ/selenium/issues/4555
        return self.execute(Command.FIND_ELEMENTS, {
            'using': by,
            'value': value})['value'] or []
24987
function getAll(url, collection) {
    // Initialise array
    collection = typeof collection === 'undefined' ? [] : collection;

    return makeRequest(url).then(function (data) {
      // Add each item to array
      var length = data.results.length;
      for (var i = 0; i < length; ++i) {
        collection.push(data.results[i]);
      }

      if (data.next === null) {
        // Return on final page
        return collection;
      } else {
        return getAll(data.next, collection);
      }
    }).catch(function (err) {
      throw err;
    });
  }
906411
function (elements, attribute, value) {
            var foundElements = [], value = value || null;
            for (i = 0; i < elements.length; i++) {
                // If the value parameter is set, return only the
                // elements that has the given attribute value.
                if (value !== null) {
                    if (elements[i].getAttribute(attribute) === value)
                        foundElements.push(elements[i]);
                } else {
                    if (elements[i].getAttribute(attribute) !== null)
                        foundElements.push(elements[i]);
                }
            }

            return foundElements;
        }
122682
function query(element, elementQuery) {
  if (!element.content) {
    return [];
  }

  if (!lodash.isArray(element.content)) {
    return [];
  }

  const results = lodash.where(element.content, elementQuery);

  return lodash
    .chain(element.content)
    .map((nestedElement) => {
      return query(nestedElement, elementQuery);
    })
    .flatten()
    .concat(results)
    .value();
}
1140417
function selector(str) {
        var elems = [];

        each(str.split(/\s*,\s*/), function(s) {
            var m = s.match(/([#.])(\w+)/);
            if (m === null) {
                throw Error('Supports only simple single #ID or .CLASS selector.');
            }

            if (m[1]) {
                var elem = document.getElementById(m[2]);

                if (elem) {
                    elems.push(elem);
                }
            }

            elems = elems.concat(getElementsByClassName(str));
        });

        return elems;
    }