Change record status: 
Project: 
Introduced in branch: 
11.5.x
Introduced in version: 
11.5.0
Description: 

As Functional tests are converted to Kernel tests the xpath() function has become ambiguous. In functional tests this function would return NodeElement[] and in Kernel tests it would return SimpleXMLElement[].

To disambiguate:

\Drupal\Tests\BrowserTestBase::xpath() is deprecated, use BrowserTestBase::getNodeElementsByXpath() instead.

\Drupal\KernelTests\AssertContentTrait::xpath() is deprecated, use AssertContentTrait::getSimpleXmlElementsByXpath() instead.

Impacts: 
Module developers