Reputation: 21
<h1 class="currentStatusUserName">
<a href="/_ui/core/userprofile/UserProfilePage">Apttus 0614CommSalesRep1</a>
I'm trying to capture into a variable Apttus 0614CommSalesRep1
but I'm not successful with the following
salesUser = driver.findElement(By.xpath(
"//a[@href='/_ui/core/userprofile/UserProfilePage']"))
.getText();
Upvotes: 0
Views: 39
Reputation: 1806
Alternate methods for .getText()
driver.findElement(By.xpath("")).getAttribute("innerHTML");
driver.findElement(By.xpath("")).getAttribute("textContent");
Upvotes: 1