The click Event is working fine but sendKeys event is not.
My Code is:-
 driver.findElement(By.id("radio-1-4")).click();
 jse.executeScript("scroll(0, 500);");
 System.out.println("Authority Filter");
 driver.findElement(By.xpath("//*[@class=\"filter-label-text\" and text()= 'Authority']")).click();
 Thread.sleep(3000);
 //driver.findElement(By.xpath("//label[@class=\"control-label\" and @for='tfid-665-0']//parent::div[1]/child::input")).sendKeys("Public Work Department");
 WebElement element = driver.findElement(By.id("tfid-602-0"));
 element.click();
 element.sendKeys("public");
I am getting error:
Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#tfid\-602\-0"}
(Session info: chrome=79.0.3945.130)
The HTML of the textbox is:-
<div class="form-group form-group-depth-1 form-group-search">
    <label for="tfid-664-0" class="control-label">
    </label>
    <input type="text" placeholder="Search for Authorities" id="tfid-664-0" name="search" class="form-control" value="">
</div>