I am trying to click on one element and also trying for sendkeys.
I am able to see id and name of the element, but when I am trying to click on it, it is giving me:
Unable to locate element: #customer_firstname
Check below HTML
<input onkeyup="$('#firstname').val(this.value);" class="is_required validate form-control" data-validate="isName" id="customer_firstname" name="customer_firstname" value="" type="text">
I have simply tried by id, name and xpath.
driver.findElement(By.id("customer_firstname")).sendKeys("ddddd");
driver.findElement(By.name("customer_firstname")).sendKeys("ddddd");
driver.findElement(By.xpath(".//*[@id='customer_firstname']")).sendKeys("ddddd");
Here is the code
driver.get("automationpractice.com/index.php"); driver.findElement(By.linkText("Sign in")).click(); driver.findElement(By.id("email_create")).sendKeys("test@test.com"); driver.findElement(By.id("SubmitCreate")).click(); //driver.findElement(By.name("firstname")).sendKeys("dsdsd"); driver.findElement(By.name("customer_firstname")).sendKeys("sadsa");