What is text () in xpath?

What is text () in xpath?

The XPath text() function is a Selenium WebDriver built-in function that is used to locate elements based on the text of a web element. It aids in locating specific text elements and locates the elements within the set of text nodes. You should the string form to locate the elements.