[英]Not able to get the xpathcount using Webdriver with Java
無法使用Webdriver獲取xpathcount。 通過使用以下代碼,我將計數為0。
int xpathcount= driver.findElements(By.xpath(("//table[@id='ctl00_MasterPlaceHolder_GrdHistory']/tbody/tr"))).size();
任何幫助將不勝感激。
嘗試下面的代碼,您在使用括號時遇到了一些麻煩...
int xpathcount = driver.findElements(By.xpath("//table[@id='ctl00_MasterPlaceHolder_GrdHistory']/tbody/tr")).size();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.