src/ElementResolver.php
public function firstOrFail($selectors)
    {
        foreach ((array) $selectors as $selector) {
            try {
                return $this->findOrFail($selector);
            } catch (Exception $e) {
                //
            }
        }

        throw $e;
    }
public function firstOrFail($selectors)
    {
        foreach ((array) $selectors as $selector) {
            try {
                return $this->findOrFail($selector);
            } catch (Exception $e) {
                //
            }
        }

        throw $e;
    }
public function firstOrFail ( $ selectors ) { foreach ( ( array ) $ selectors as $ selector ) { try { return $ this -> findOrFail ( $ selector ) ; } catch ( Exception $ e ) { // } } throw $ e ; }
Get the first element matching the given selectors.

@param  array  $selectors
@return \Facebook\WebDriver\Remote\RemoteWebElement
@throws \Exception
Get the first element matching the given selectors .