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

Breadcrumb

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

function NodeElement::getParent

Returns parent element to the current one.

Return value

NodeElement

File

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

Class

NodeElement
Page element node.

Namespace

Behat\Mink\Element

Code

public function getParent() {
    $parent = $this->find('xpath', '..');
    if ($parent === null) {
        throw new DriverException('Could not find the element parent. Maybe the element has been removed from the page.');
    }
    return $parent;
}

API Navigation

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