The belowcode getting some errors while using sendkeys i.e.
exception in thread "main" java.lang.Error: Unresolved compilation problems:
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)
at com.selenium.Selenium_Basics.main(Selenium_Basics.java:20)
package com.selenium;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Selenium_Basics {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver=new FirefoxDriver();
//username
WebElement Email_fld=driver.findElement(By.xpath("//*[@id='Email']"));
WebElement Password=driver.findElement(By.xpath("//*[@id='Passwd']"));
Password.sendKeys("9160362943");
WebElement signin_button=driver.findElement(By.xpath("//*[@id='signIn']"));
signin_button.click();
}
}