【发布时间】:2016-09-27 02:15:22
【问题描述】:
我正在尝试找出答案。下图中的订单数量使用//*[@id='past-orders-tab']/div[contains(@class,'physical')]
但它使用 .size() 返回零(存储在 List[WebElement] 中)
.当我使用findelement() 选择一个订单时,它工作正常。这是页面源代码
如何纠正?
【问题讨论】:
-
By.xpath("past_orderbox") --- 这个 xpath 没有意义。 past_orderbox 是包含您之前编写的 xpath 的变量吗?如果是这样删除双引号。
-
我应该从 .properties 文件中读取。谢谢@Grasshopper
标签: selenium selenium-webdriver