27
Apr

working with   in xpath

	private static WebElement getElement(WebDriver driver, String textT) {
		List<WebElement> e = driver.findElements(By.xpath("//td[contains(translate(., '\u00A0', ' '), 'Number of securities')]"));
		WebElement jack = null;
		for (WebElement x : e) {
			String xyz = x.getAttribute("outerHTML").replaceAll("&nbsp;", " ");
			if (xyz.contains("Number of securities")) {
				System.out.println(x.getAttribute("innerHTML"));
				jack = x;
				break;
			}
		}
		return jack;
	}