Clicks the specified link in the toolbar.

Example: Then I should see "Howdy, admin" in the toolbar

@Then I should see :text in the toolbar

@param string $text

@throws ElementTextException
163751
public function iShouldSeeTextInToolbar(string $text)
    {
        $toolbar = $this->getElement('Toolbar');
        $actual  = $toolbar->getText();
        $regex   = '/' . preg_quote($text, '/') . '/ui';

        if (! preg_match($regex, $actual)) {
            $message = sprintf('[W806] The text "%s" was not found in the toolbar', $text);
            throw new ElementTextException($message, $this->getSession()->getDriver(), $toolbar);
        }
    }
479417
protected function onSetText(string $text): void
    {
        parent::onSetText($text);

        $this->isInvalid = false;
        $this->value = null;

        if ($this->hasError()) {
            return;
        }

        if ($this->isEmpty()) {
            return;
        }

        try {
            $this->setValue(new \DateTimeImmutable($text));
        } catch (\Exception $exception) {
            $this->setError('Invalid value');
            $this->isInvalid = true;
        }
    }
669489
public function search(string $text)
    {
        $search = $this->find('css', '#adminbarsearch');

        if (! $search) {
            throw new ExpectationException(
                '[W404] Search field in the toolbar could not be found',
                $this->getDriver()
            );
        }

        try {
            $search->find('css', '#adminbar-search')->press();
            $search->find('css', '#adminbar-search')->focus();
            $search->fillField('adminbar-search', $text);
            $search->find('css', '#adminbar-search')->focus();
        } catch (UnsupportedDriverActionException $e) {
            $search->fillField('adminbar-search', $text);
        }

        $search->submit();
    }
110938
public function setTitle(string $text = null): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->title = $text;
        }

        return $this;
    }
1117137
private function addTranslatable($text)
    {
        if (strlen($text) > 1 && !isset($this->translatables[$text])) {
            $this->translatables[$text] = '';
        }
    }
1119021
public function setText($text) {
		if( !is_string($text) ) {
			throw new \Exception('RequireStringParameter');
		}
		$this->setTEXTBody(strip_tags($text));
		$this->setHTMLBody(nl2br($text));
	}
731136
public function link(string $url, string $text)
    {
        return $this->add(Link::to($url, $text));
    }
1168526
public void clickOnButton(String text) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnButton(\""+text+"\")");
		}
			
		clicker.clickOn(Button.class, text);

	}
1195390
protected function _addAction(&$text)
    {
        // All: Add the action if left empty
        if (preg_match_all('#<\s*form[^>]+action=""#si', $text, $matches, PREG_SET_ORDER))
        {
            $action = $this->getTemplate()->route();

            foreach ($matches as $match)
            {
                $str = str_replace('action=""', 'action="' . $action . '"', $match[0]);
                $text = str_replace($match[0], $str, $text);
            }
        }

        return $this;
    }
956317
public function setHtmlBody($text) {
    if (!is_string($text)) {
      $error = sprintf("HTML text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setHtmlbody($text);
  }
841591
public function addText($text)
    {
        $currentDescription = $this->project->getDescription();
        if ($currentDescription === null) {
            $this->project->setDescription($text);
        } else {
            $this->project->setDescription($currentDescription . $text);
        }
    }
210577
protected function onFormatText(string &$text): void
    {
        $lines = preg_split("/\r\n|\n|\r/", $text);
        $result = [];

        $lastEmptyLinesCount = 0;
        $hasFoundNonEmptyLines = false;

        foreach ($lines as $line) {
            if (($this->textFormatOptions & TextFormatOptions::TRIM) !== 0) {
                $line = trim($line);
            }
            if (($this->textFormatOptions & TextFormatOptions::COMPACT) !== 0) {
                $line = preg_replace('/\s+/', ' ', $line);
            }

            if ($line === '') {
                if (($this->textFormatOptions & TextFormatOptions::COMPACT_LINES) !== 0 && $lastEmptyLinesCount > 0) {
                    continue;
                }
                if (($this->textFormatOptions & TextFormatOptions::TRIM_LINES) !== 0 && !$hasFoundNonEmptyLines) {
                    continue;
                }

                $lastEmptyLinesCount++;
            } else {
                $lastEmptyLinesCount = 0;
                $hasFoundNonEmptyLines = true;
            }

            $result[] = $line;
        }

        if (($this->textFormatOptions & TextFormatOptions::TRIM_LINES) !== 0 && $lastEmptyLinesCount > 0) {
            // Trim the last empty lines (we did not know until now that those were at the end).
            array_splice($result, -$lastEmptyLinesCount);
        }

        $text = implode("\r\n", $result);
    }
1319244
public function linkTo($text, $urlOptions, array $attrs = [])
    {
        $url = $this->parseUrlOptions($urlOptions);
        return $this->contentTag('a', $text, array_merge(['href' => $url], $attrs));
    }
299708
protected function info($text)
    {
        if($this->console) {
            $this->console->info($text);
        }

        if($this->logger) {
            $this->logger->info($text);
        }
    }
283919
def click_link_with_text(link_text, opts = {})
        if opts && opts[:index]
          elements = find_elements(:link_text, link_text)
          elements[opts[:index]-1].click
        else
          find_element(:link_text, link_text).click
        end
      end
542611
protected function frame($text)
    {
        $line   = '+'.str_repeat('-', strlen($text) + 4).'+';
        $this->info($line);
        $this->info("|  $text  |");
        $this->info($line);
    }
1275934
public function seeInPageSource($text)
    {
        $this->assertThat(
            $this->webDriver->getPageSource(),
            new PageConstraint($text, $this->_getCurrentUri()),
            ''
        );
    }