sendKeys
function is displaying following error in the code:
The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
Error line code:
driver.findElement(By.name("username")).sendKeys("Bharat");
I'm importing following librariers:
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
Java Version: 1.8.0_281
Selenium: 3.141.59
Appreciate you help
question from:
https://stackoverflow.com/questions/65876917/selenium-with-java-error-in-using-sendkeys-function 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…