0
在常规使用的webdriver 2.25.0使用此代码神秘MissingMethodException:对webdriver的cssSelector方法
import org.openqa.selenium.By;
...
driver.findElement(By.cssSelector("div.test"))
表演:
groovy.lang.MissingMethodException: No signature of method: static org.openqa.selenium.By.cssSelector() is applicable for argument types: (java.lang.String) values:
的docs状态这种方法是有效的。我无法弄清楚这个方法如何解决,而“name()”是。
您确定您在类路径上有正确的WebDriver版本吗?什么'By.methods.findAll {it.name ==“cssSelector”}'打印? –