使用xpath查找元素的子元素,找不到
List<WebElement> allUserList = driver.findElements(By.xpath("xxx")); for (WebElement user:allUserList){ String xxx = user.findElement(By.xpath(".//a")).getText()
}
需要在前面加个点
List<WebElement> allUserList = driver.findElements(By.xpath("xxx")); for (WebElement user:allUserList){ String xxx = user.findElement(By.xpath(".//a")).getText()
}
需要在前面加个点