<h1 class="currentStatusUserName">
<a href="/_ui/core/userprofile/UserProfilePage">Apttus 0614CommSalesRep1</a>
我试图捕获变量Apttus 0614CommSalesRep1
,但我没有成功使用以下
salesUser = driver.findElement(By.xpath(
"//a[@href='/_ui/core/userprofile/UserProfilePage']"))
.getText();
答案 0 :(得分:1)
.getText()
driver.findElement(By.xpath("")).getAttribute("innerHTML");
driver.findElement(By.xpath("")).getAttribute("textContent");