I would do the same, first select the first wording and not the second ... for most tests.
You want your tests to interrupt changes related to the functionality covered by these tests, and you want the same tests to ignore most of the other changes in the application.
So, if you check that the search for "foo" should return more than zero documents, this has nothing to do with the structure of the page and should ignore such changes.
However, in a test written to ensure that the search form is provided with a submit button, you would like to translate these assumptions into XPath, used to move from the form to the button.
source share