diff --git a/core/modules/contact/src/Tests/ContactAuthenticatedUserTest.php b/core/modules/contact/src/Tests/ContactAuthenticatedUserTest.php
index eb7c527..76a13e9 100644
--- a/core/modules/contact/src/Tests/ContactAuthenticatedUserTest.php
+++ b/core/modules/contact/src/Tests/ContactAuthenticatedUserTest.php
@@ -26,10 +26,10 @@ function testContactSiteWideTextfieldsLoggedInTestCase() {
     $this->drupalGet('contact');
 
     // Ensure that there is no textfield for name.
-    $this->assertFalse($this->xpath('//input[@name=:name]', array(':name' => 'name')));
+    $this->assertFalse($this->xpathUsingMink('//input[@name=:name]', array(':name' => 'name')));
 
     // Ensure that there is no textfield for email.
-    $this->assertFalse($this->xpath('//input[@name=:name]', array(':name' => 'mail')));
+    $this->assertFalse($this->xpathUsingMink('//input[@name=:name]', array(':name' => 'mail')));
   }
 
 }
diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php
index e19f319..fc12351 100644
--- a/core/modules/simpletest/src/AssertContentTrait.php
+++ b/core/modules/simpletest/src/AssertContentTrait.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\simpletest;
 
+use Behat\Mink\Driver\GoutteDriver;
+use Behat\Mink\Session;
 use Drupal\Component\Serialization\Json;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
@@ -208,6 +210,9 @@ protected function buildXPathQuery($xpath, array $args = array()) {
    *
    * The search is relative to the root element (HTML tag normally) of the page.
    *
+   * For future compatibility with BrowserTestBase you could use xpathUsingMink
+   * instead as wel..
+   *
    * @param string $xpath
    *   The xpath string to use in the search.
    * @param array $arguments
@@ -235,6 +240,41 @@ protected function xpath($xpath, array $arguments = []) {
   }
 
   /**
+   * Performs an xpath search on the contents of the internal browser.
+   *
+   * This method is a forwards compatibility helper for the conversion to
+   * \Drupal\Tests\BrowserTestBase. The search is relative to the root element
+   * (HTML tag normally) of the page.
+   *
+   * @param string $xpath
+   *   The xpath string to use in the search.
+   * @param array $arguments
+   *   An array of arguments with keys in the form ':name' matching the
+   *   placeholders in the query. The values may be either strings or numeric
+   *   values.
+   *
+   * @return \Behat\Mink\Element\NodeElement[]|false
+   *   The return value of the xpath search or FALSE on failure. For details on
+   *   the xpath string format checkout the DomDocument documentation. For more
+   *   details on the return values, checkout the mink documentation.
+   *
+   * @see http://php.net/manual/class.domdocument.php
+   * @see http://mink.behat.org
+   */
+  protected function xpathUsingMink($xpath, array $arguments = []) {
+    $client = new GoutteWithManualResponse();
+    $client->setCrawlerFromContent($this->getUrl(), $this->getRawContent(), $this->drupalGetHeader('Content-Type'));
+
+    $driver = new GoutteDriver($client);
+    $session = new Session($driver);
+
+    $session->start();
+
+    $xpath = $this->buildXPathQuery($xpath, $arguments);
+    return $session->getPage()->findAll('xpath', $xpath);
+  }
+
+  /**
    * Searches elements using a CSS selector in the raw content.
    *
    * The search is relative to the root element (HTML tag normally) of the page.
diff --git a/core/modules/simpletest/src/GoutteWithManualResponse.php b/core/modules/simpletest/src/GoutteWithManualResponse.php
new file mode 100644
index 0000000..0b508ff
--- /dev/null
+++ b/core/modules/simpletest/src/GoutteWithManualResponse.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace Drupal\simpletest;
+
+use Behat\Mink\Driver\Goutte\Client;
+
+/**
+ * Used as part of the forward compatibility layer for BrowserTestBase.
+ *
+ * This class allows you to set the response content manually on a Goutte
+ * client.
+ *
+ * @internal
+ *
+ * @see \Drupal\simpletest\AssertContentTrait::xpathUsingMink
+ */
+class GoutteWithManualResponse extends Client {
+
+  /**
+   * Creates a crawler and sets it to the object.
+   *
+   * @param string $uri
+   *   A URI.
+   * @param string $content
+   *   Content for the crawler to use.
+   * @param string $type
+   *   The content type.
+   */
+  public function setCrawlerFromContent($uri, $content, $type) {
+    $this->crawler = $this->createCrawlerFromContent($uri, $content, $type);
+  }
+
+}
diff --git a/core/modules/system/src/Tests/System/PageTitleTest.php b/core/modules/system/src/Tests/System/PageTitleTest.php
index 848eacc..8c16fde 100644
--- a/core/modules/system/src/Tests/System/PageTitleTest.php
+++ b/core/modules/system/src/Tests/System/PageTitleTest.php
@@ -102,15 +102,15 @@ public function testRoutingTitle() {
     $this->drupalGet('test-render-title');
 
     $this->assertTitle('Foo | Drupal');
-    $result = $this->xpath('//h1[@class="page-title"]');
-    $this->assertEqual('Foo', (string) $result[0]);
+    $result = $this->xpathUsingMink('//h1[@class="page-title"]');
+    $this->assertEqual('Foo', $result[0]->getText());
 
     // Test forms
     $this->drupalGet('form-test/object-builder');
 
     $this->assertTitle('Test dynamic title | Drupal');
-    $result = $this->xpath('//h1[@class="page-title"]');
-    $this->assertEqual('Test dynamic title', (string) $result[0]);
+    $result = $this->xpathUsingMink('//h1[@class="page-title"]');
+    $this->assertEqual('Test dynamic title', $result[0]->getText());
 
     // Set some custom translated strings.
     $this->addCustomTranslations('en', array('' => array(
@@ -122,15 +122,15 @@ public function testRoutingTitle() {
     $this->drupalGet('test-page-static-title');
 
     $this->assertTitle('Static title translated | Drupal');
-    $result = $this->xpath('//h1[@class="page-title"]');
-    $this->assertEqual('Static title translated', (string) $result[0]);
+    $result = $this->xpathUsingMink('//h1[@class="page-title"]');
+    $this->assertEqual('Static title translated', $result[0]->getText());
 
     // Test the dynamic '_title_callback' route option.
     $this->drupalGet('test-page-dynamic-title');
 
     $this->assertTitle('Dynamic title | Drupal');
-    $result = $this->xpath('//h1[@class="page-title"]');
-    $this->assertEqual('Dynamic title', (string) $result[0]);
+    $result = $this->xpathUsingMink('//h1[@class="page-title"]');
+    $this->assertEqual('Dynamic title', $result[0]->getText());
 
     // Ensure that titles are cacheable and are escaped normally if the
     // controller does not escape them.
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index ba08cd5..16ebc9e 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -1719,6 +1719,28 @@ protected function xpath($xpath, array $arguments = []) {
   }
 
   /**
+   * Performs an xpath search on the contents of the internal browser.
+   *
+   * The search is relative to the root element (HTML tag normally) of the page.
+   *
+   * @param string $xpath
+   *   The xpath string to use in the search.
+   * @param array $arguments
+   *   An array of arguments with keys in the form ':name' matching the
+   *   placeholders in the query. The values may be either strings or numeric
+   *   values.
+   *
+   * @return \Behat\Mink\Element\NodeElement[]
+   *   The list of elements matching the xpath expression.
+   *
+   * @deprecated Scheduled for removal in Drupal 9.0.0.
+   *   Use self::xpath() instead.
+   */
+  protected function xpathUsingMink($xpath, array $arguments = []) {
+    return $this->xpath($xpath, $arguments);
+  }
+
+  /**
    * Configuration accessor for tests. Returns non-overridden configuration.
    *
    * @param string $name
