I am using eclipse Helios Version: Helios Service Release 1,Build id: 20100917-0705 with selenium 3.141.59 but when I am trying to use this sendKeys()
function then it is showing error message:
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
The Source code is:
package AutomationFramework;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.By;
//import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.Alert;
//import org.openqa.selenium.WebElement;
public class HandleFileupload {
public static WebDriver driver = null;
public static void main(String[] args)
{
System.getProperty("webdriver.chrome.driver","G:\\chromedriver.exe");
driver = new ChromeDriver();
driver.get("https://html.com/input-type-file/");
driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS );
driver.manage().window().maximize();
driver.findElement(By.xpath("//*[@id='fileupload']")).sendKeys("filupload");
}
}