📅  最后修改于: 2022-03-11 14:56:57.678000             🧑  作者: Mango
/**
*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 + "')]");
}