src/ElementResolver.php
/**
     * Resolve the element for a given button by text.
     *
     * @param  string  $button
     * @return \Facebook\WebDriver\Remote\RemoteWebElement|null
     */
Resolve the element for a given button by text.
Resolve the element for a given button by text .
protected function findButtonByText($button)
    {
        foreach ($this->all('button') as $element) {
            if (Str::contains($element->getText(), $button)) {
                return $element;
            }
        }
    }
protected function findButtonByText ( $ button ) { foreach ( $ this -> all ( 'button' ) as $ element ) { if ( Str :: contains ( $ element -> getText ( ) , $ button ) ) { return $ element ; } } }
Resolve the element for a given button by text.
Resolve the element for a given button by text .