diff --git a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
index 0e230a4..9f72545 100644
--- a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
+++ b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
@@ -57,7 +57,7 @@ public function testForm() {
     $this->assertSession()->elementExists('css', 'form#form-test-form-test-object');
     $this->assertSession()->fieldExists('bananas');
 
-    $edit = ['bananas' => 'green', 'strawberry' => 'bar'];
+    $edit = ['bananas' => 'green', 'strawberry' => 'pink'];
     $this->submitForm($edit, 'Save', 'form-test-form-test-object');
 
     $config_factory = $this->container->get('config.factory');
diff --git a/core/modules/system/tests/modules/form_test/src/FormTestObject.php b/core/modules/system/tests/modules/form_test/src/FormTestObject.php
index 5beb90b..f57eb53 100644
--- a/core/modules/system/tests/modules/form_test/src/FormTestObject.php
+++ b/core/modules/system/tests/modules/form_test/src/FormTestObject.php
@@ -36,7 +36,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     );
     $form['strawberry'] = [
       '#type' => 'hidden',
-      '#value' => 'foo',
+      '#value' => 'red',
     ];
 
     $form['actions']['#type'] = 'actions';
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 3beb32f..b561736 100644
--- a/core/tests/Drupal/Tests/BrowserTestBase.php
+++ b/core/tests/Drupal/Tests/BrowserTestBase.php
@@ -5,6 +5,7 @@
 use Behat\Mink\Driver\GoutteDriver;
 use Behat\Mink\Element\Element;
 use Behat\Mink\Mink;
+use Behat\Mink\Selector\SelectorsHandler;
 use Behat\Mink\Session;
 use Drupal\Component\FileCache\FileCacheFactory;
 use Drupal\Component\Serialization\Yaml;
@@ -308,7 +309,10 @@ protected function initMink() {
       $driver->getClient()->setClient(\Drupal::httpClient());
     }
 
-    $session = new Session($driver);
+    $selectors_handler = new SelectorsHandler([
+      'named_partial_including_hidden' => new PartialNamedIncludingHiddenSelector()
+    ]);
+    $session = new Session($driver, $selectors_handler);
     $this->mink = new Mink();
     $this->mink->registerSession('default', $session);
     $this->mink->setDefaultSessionName('default');
@@ -924,7 +928,7 @@ protected function submitForm(array $edit, $submit, $form_html_id = NULL) {
 
     // Edit the form values.
     foreach ($edit as $name => $value) {
-      $field = $assert_session->fieldExists($name, $form);
+      $field = $assert_session->fieldExists($name, $form, TRUE);
 
       // Provide support for the values '1' and '0' for checkboxes instead of
       // TRUE and FALSE.
diff --git a/core/tests/Drupal/Tests/PartialNamedIncludingHiddenSelector.php b/core/tests/Drupal/Tests/PartialNamedIncludingHiddenSelector.php
new file mode 100644
index 0000000..6915807
--- /dev/null
+++ b/core/tests/Drupal/Tests/PartialNamedIncludingHiddenSelector.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\Tests;
+
+use Behat\Mink\Selector\PartialNamedSelector;
+
+/**
+ * Extends PartialNamedSelector to allow retrieval of hidden fields.
+ *
+ * @see \Behat\Mink\Selector\PartialNamedSelector
+ */
+class PartialNamedIncludingHiddenSelector extends PartialNamedSelector {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct() {
+    $this->registerReplacement('%notFieldTypeFilter%', "not(%buttonTypeFilter%)");
+    parent::__construct();
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php
index 6156dda..aa8b642 100644
--- a/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -422,4 +422,27 @@ public function fieldDisabled($field, TraversableElement $container = NULL)  {
     return $node;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function fieldExists($field, TraversableElement $container = NULL, $include_hidden_fields = FALSE) {
+    if (!$include_hidden_fields) {
+      return parent::fieldExists($field, $container);
+    }
+
+    try {
+      return parent::fieldExists($field, $container);
+    }
+    catch (ElementNotFoundException $element_not_found_exception) {
+      // Try once again with the 'named_partial_including_hidden' selector to
+      // grab the hidden fields.
+      $container = $container ?: $this->session->getPage();
+      $items = $container->findAll('named_partial_including_hidden', ['field', $field]);
+      if (!$items) {
+        throw $element_not_found_exception;
+      }
+      return current($items);
+    }
+  }
+
 }
