src/ElementResolver.php
public function resolveForButtonPress($button)
    {
        foreach ($this->buttonFinders as $method) {
            if (! is_null($element = $this->{$method}($button))) {
                return $element;
            }
        }

        throw new InvalidArgumentException(
            "Unable to locate button [{$button}]."
        );
    }
public function resolveForButtonPress($button)
    {
        foreach ($this->buttonFinders as $method) {
            if (! is_null($element = $this->{$method}($button))) {
                return $element;
            }
        }

        throw new InvalidArgumentException(
            "Unable to locate button [{$button}]."
        );
    }
public function resolveForButtonPress ( $ button ) { foreach ( $ this -> buttonFinders as $ method ) { if ( ! is_null ( $ element = $ this -> { $ method } ( $ button ) ) ) { return $ element ; } } throw new InvalidArgumentException ( "Unable to locate button [{$button}]." ) ; }
Resolve the element for a given button.

@param  string  $button
@return \Facebook\WebDriver\Remote\RemoteWebElement
Resolve the element for a given button .