diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index ec190a0..6ce4ca9 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -1882,7 +1882,7 @@ protected function drupalProcessAjaxResponse($content, array $ajax_response, arr
             // ajax.js adds an enclosing DIV to work around a Safari bug.
             $newDom = new \DOMDocument();
             @$newDom->loadHTML('<div>' . $command['data'] . '</div>');
-            $newNode = $dom->importNode($newDom->documentElement->firstChild->firstChild, TRUE);
+            $newNode = @$dom->importNode($newDom->documentElement->firstChild->firstChild, TRUE);
             $method = isset($command['method']) ? $command['method'] : $ajax_settings['method'];
             // The "method" is a jQuery DOM manipulation function. Emulate
             // each one using PHP's DOMNode API.
