\Behat\Mink\Driver\BrowserKitDriver::getText() will return text in the head section and also any json on the page that's contained in a script tag in the HTML body. \Behat\Mink\Driver\Selenium2Driver::getText(), for example, will not return text from the head section or script tags in the body section. Given the Mink documentation states:
getText() will strip tags and unprinted characters out of the response, including newlines. So it’ll basically return the text that the user sees on the page.
I'm not sure if this is a Symfony\DomCrawler issue or not.
See for a discussion of the affects of this - https://www.drupal.org/project/drupal/issues/3175718
\Behat\Mink\Driver\BrowserKitDriver::getText() will return text in the head section and also any json on the page that's contained in a
scripttag in the HTML body. \Behat\Mink\Driver\Selenium2Driver::getText(), for example, will not return text from the head section or script tags in the body section. Given the Mink documentation states:I'm not sure if this is a Symfony\DomCrawler issue or not.
See for a discussion of the affects of this - https://www.drupal.org/project/drupal/issues/3175718