【发布时间】:2019-07-22 12:01:00
【问题描述】:
使用 WebDriver(Java 驱动)的自定义 XPath 无法在 https://cloud.google.com/products/calculator/ 上找到“实例数”字段
我已经尝试过 xpath: //input[@name = "quantity" and @id="input_52"] 它适用于 Ctrl + F 和 Chrome 检查代码功能,但不适用于 WebDriver
这是 Idea 中的堆栈跟踪消息: org.openqa.selenium.NoSuchElementException: 没有这样的元素: 无法定位元素: {"method":"xpath","selector":"//input[@name = "quantity" and @id="input_52"]" }
提前感谢您的帮助
【问题讨论】:
标签: java google-chrome webdriver