Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Java
public static void main(String[] args) {
	
		WebDriver driver = new FirefoxDriver();
		driver.get("http://venu-pc/login.do");
		driver.manage().window().maximize();
		driver.findElement(By.id("Username")).sendKeys(" admin");
		driver.findElement(By.id("Password")).sendKeys(" manager");
		System.out.println(driver.getTitle());
	         driver.close();

when i wrote this code . iam getting error that
The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
what does it mean
Posted
Updated 26-Aug-15 0:25am
v2

1 solution

You are trying to send a string, but the documentation[^] shows a CharSequence[^]. You need to convert your string to this type.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900