src/ElementResolver.php
public function resolveForAttachment($field)
    {
        if (! is_null($element = $this->findById($field))) {
            return $element;
        }

        return $this->firstOrFail([
            $field, "input[type=file][name='{$field}']",
        ]);
    }
public function resolveForAttachment($field)
    {
        if (! is_null($element = $this->findById($field))) {
            return $element;
        }

        return $this->firstOrFail([
            $field, "input[type=file][name='{$field}']",
        ]);
    }
public function resolveForAttachment ( $ field ) { if ( ! is_null ( $ element = $ this -> findById ( $ field ) ) ) { return $ element ; } return $ this -> firstOrFail ( [ $ field , "input[type=file][name='{$field}']" , ] ) ; }
Resolve the element for a given file "field".

@param  string  $field
@return \Facebook\WebDriver\Remote\RemoteWebElement
@throws \Exception
Resolve the element for a given file field .