public function attachFileToField($locator, $path)
    {
        $field = $this->findField($locator);

        if (null === $field) {
            throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
        }

        $field->attachFile($path);
    }
public function attachFileToField($locator, $path)
    {
        $field = $this->findField($locator);

        if (null === $field) {
            throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
        }

        $field->attachFile($path);
    }
public function attachFileToField ( $ locator , $ path ) { $ field = $ this -> findField ( $ locator ) ; if ( null === $ field ) { throw new ElementNotFoundException ( $ this -> getDriver ( ) , 'form field' , 'id|name|label|value' , $ locator ) ; } $ field -> attachFile ( $ path ) ; }
Attach file to file field with specified locator.

@param string $locator input id, name or label
@param string $path    path to file

@throws ElementNotFoundException

@see NodeElement::attachFile
Attach file to file field with specified locator .