diff --git a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
index 52b48aaf0b009a13db7101090a37b9d8e2599627..c427a39310e43cc04673559d3c2cde6b73e2c277 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php
@@ -123,7 +123,7 @@ public function waitForElementVisible($selector, $locator, $timeout = 10000) {
   }
 
   /**
-   * Waits for the specified text and returns its element when available.
+   * Waits for the specified text and returns TRUE when it is available.
    *
    * @param string $text
    *   The text to wait for.
@@ -131,7 +131,7 @@ public function waitForElementVisible($selector, $locator, $timeout = 10000) {
    *   (Optional) Timeout in milliseconds, defaults to 10000.
    *
    * @return bool
-   *   TRUE if not found, FALSE if found.
+   *   TRUE if found, FALSE if not found.
    */
   public function waitForText($text, $timeout = 10000) {
     return (bool) $this->waitForHelper($timeout, function (Element $page) use ($text) {