Locating element with : Selector().withText(text) -> is ideally a good way of location if we do not have any other matching tag name to the element, but when the application supports multiple language, i,e more than 1 language then the text field will vary with different language chosen.
There might come few suggestion to traverse and find from previous element or the following element, but for instance let take the text is a warning message that varies according to user input i,e some times it might be invalid user name and some times it might be not registered user, locating it without exact text will fail the test.
Is there any suggestion to add more than one text, like in xpath //*[text()='abc' || text()='xyz'] in testcafe ?
You can try using a regular expression to handle the scenario,
Selector("element").withText(/text1|text2|text3/);
You can also select elements based on its attributes. https://devexpress.github.io/testcafe/documentation/reference/test-api/selector/withattribute.html