function UiHelperTrait::getUrl

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::getUrl()
  2. 10 core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::getUrl()
  3. 8.9.x core/tests/Drupal/Tests/UiHelperTrait.php \Drupal\Tests\UiHelperTrait::getUrl()

Get the current URL from the browser.

Return value

string The current URL.

1 call to UiHelperTrait::getUrl()
BrowserTestBase::getSessionCookies in core/tests/Drupal/Tests/BrowserTestBase.php
Get session cookies from current session.

File

core/tests/Drupal/Tests/UiHelperTrait.php, line 520

Class

UiHelperTrait
Provides UI helper methods.

Namespace

Drupal\Tests

Code

protected function getUrl() {
  return $this->getSession()
    ->getCurrentUrl();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.