Locates elements by their text content. Searches in common text properties like Text, Content, Header.
public static By Text(string text, bool exact = true)
The text to match.
If true, requires exact match. If false, uses contains.
var element = driver.FindElement(By.Text("Submit"));
var partial = driver.FindElement(By.Text("Sub", exact: false));