While trying the below code
driver.findElement(By.id("txt_UserName")).click();
driver.findElement(By.xpath(".//*[@id='txt_UserName'][@name='txt_UserName'][@class='formInput']")).sendKeys(new String("karthik"));
driver.findElement(By.name("txt_Password")).clear();
I am getting the following error :
Exception in thread "main" org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string