diff --git a/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php b/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
index 796360f..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'];
+    $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 5fb0dae..f57eb53 100644
--- a/core/modules/system/tests/modules/form_test/src/FormTestObject.php
+++ b/core/modules/system/tests/modules/form_test/src/FormTestObject.php
@@ -34,6 +34,10 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       '#type' => 'textfield',
       '#title' => $this->t('Bananas'),
     );
+    $form['strawberry'] = [
+      '#type' => 'hidden',
+      '#value' => 'red',
+    ];
 
     $form['actions']['#type'] = 'actions';
     $form['actions']['submit'] = array(
diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php
index 4a8ac3b..5be6d19 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;
@@ -313,7 +314,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');
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..721fb24 100644
--- a/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -422,4 +422,39 @@ public function fieldDisabled($field, TraversableElement $container = NULL)  {
     return $node;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function fieldExists($field, TraversableElement $container = NULL) {
+    try {
+      return parent::fieldExists($field, $container);
+    }
+    catch (ElementNotFoundException $exception) {
+      // Try once again with the 'named_partial_including_hidden' selector to
+      // get potential hidden fields.
+      $container = $container ?: $this->session->getPage();
+      if ($node = $container->find('named_partial_including_hidden', ['field', $field])) {
+        return $node;
+      }
+      throw $exception;
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fieldNotExists($field, TraversableElement $container = NULL) {
+    try {
+      parent::fieldNotExists($field, $container);
+    }
+    catch (ExpectationException $exception) {
+      // Try once again with the 'named_partial_including_hidden' selector to
+      // get potential hidden fields.
+      $container = $container ?: $this->session->getPage();
+      if ($container->find('named_partial_including_hidden', ['field', $field])) {
+        throw $exception;
+      }
+    }
+  }
+
 }
