我对ChromeDriver进行了测试,它运行良好,但我无法使用与PhantomJS相同的代码,因为" sendKeys"
错误 WebElement login = driver.findElement(By.id("username"));
login.sendKeys(username);
这就是我得到的:
Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: TypeError - undefined is not a constructor (evaluating '_getTagName(currWindow).toLowerCase()')