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