Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NodeElement.php

function NodeElement::attachFile

Attach file to current node if it's a file input.

Calling this method on any other elements than file input is not allowed.

Parameters

string $path path to file (local):

Return value

void

File

vendor/behat/mink/src/Element/NodeElement.php, line 300

Class

NodeElement
Page element node.

Namespace

Behat\Mink\Element

Code

public function attachFile(string $path) {
    $this->getDriver()
        ->attachFile($this->getXpath(), $path);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal