William
0
Q:

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 + "')]");
    	
    }
0

New to Communities?

Join the community