我正在尝试自动化 gmail 登录。
当我在用户名输入框中输入文本时,使用sendKeys()
它会引发异常。
我的代码:
WebElement userName = driver.findElement(By.id("Email"));
userName.sendKeys("tutorial");
例外:
Error:The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String) at com.gmail.test.Gmaillogin.main(Gmaillogin.java:65)