HTML:的getText()澄清 - 的XPath沒有返回值
<strong class="text-xl ng-binding" ng-bind="summary.PublishedIssuedRecent">5</strong>
我的XPath:
@FindBy(how = How.XPATH, using = "//strong[@ng-bind='summary.PublishedIssuedRecent']")
public WebElement countRecentlyPublishedApplication;
String pubCount = countRecentlyPublishedApplication.getText();
我的意料
我想提取的5
值但我在pubCount
字符串中獲得空值,請建議是否有任何錯誤我的xpath
我假設你使用硒,對不對?如果是這樣,請添加相應的標籤。 – Markus