grabTextFrom() public méthode

Finds and returns the text contents of the given element. If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression. php grabTextFrom('h1'); $heading = $I->grabTextFrom('descendant-or-self::h1'); $value = $I->grabTextFrom('~
See also: Codeception\Lib\InnerBrowser::grabTextFrom()
public grabTextFrom ( $cssOrXPathOrRegex ) : mixed
$cssOrXPathOrRegex
Résultat mixed
Exemple #1
0
 /**
  * Grabs text from provided selector with the help of webguy.
  *
  * @param string $selector Element selector (css, regexp, xpath).
  *
  * @return string Grabbed text.
  * @since 0.1.0
  */
 public function grab($selector)
 {
     return $this->guy->grabTextFrom($selector);
 }