find_element_by_text selenum code example
Example: find web element by text
/**
*Get the Web element from its text
* @param name
* @param elementText
* @return WebElement
*/
public WebElement getElementByText(String name, String elementText) {
return WebUI.getWebElement("xpath","//a[starts-with(@name, '" + name + "') and (text() = '" + elementText + "' or . = '" + elementText + "')]");
}