You are here

public function PageContentTrait::getHtml in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/jcalderonzumba/mink-phantomjs-driver/src/PageContentTrait.php \Zumba\Mink\Driver\PageContentTrait::getHtml()

Returns the inner html of a given xpath

Parameters

string $xpath:

Return value

string

Throws

DriverException

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/PageContentTrait.php, line 41

Class

PageContentTrait
Class PageContentTrait @package Zumba\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

public function getHtml($xpath) {
  $elements = $this
    ->findElement($xpath, 1);

  //allText works only with ONE element so it will be the first one
  return $this->browser
    ->allHtml($elements["page_id"], $elements["ids"][0], "inner");
}