src/LinusShops/Contexts/Web.php
public function mapElements($cssSelector, callable $function)
    {
        $elements = $this->getElementByCssSelector($cssSelector);
        $result = array();
        if (!empty($elements)) {
            $result = $this->map($elements, $function);
        }

        return $result;
    }
public function mapElements($cssSelector, callable $function)
    {
        $elements = $this->getElementByCssSelector($cssSelector);
        $result = array();
        if (!empty($elements)) {
            $result = $this->map($elements, $function);
        }

        return $result;
    }
public function mapElements ( $ cssSelector , callable $ function ) { $ elements = $ this -> getElementByCssSelector ( $ cssSelector ) ; $ result = array ( ) ; if ( ! empty ( $ elements ) ) { $ result = $ this -> map ( $ elements , $ function ) ; } return $ result ; }
Call a function on all elements matching the given selector.

Useful to apply an assertion to every element that matches a given selector.

@param $cssSelector
@param callable $function
@return array
Call a function on all elements matching the given selector .