I had put linktext and its corrects but the error comes like Element ... is not clickable at point (750, 38).
My tried code:
driver.get("https://staging.keela.co");
WebDriverWait wait = new WebDriverWait (driver, 15);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.linkText("Log In")));
element.click();
//waiting for to load
driver.findElement(By.xpath("//input[@id='login-email']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//input[@id='login-password']")).sendKeys("keela");
driver.findElement(By.xpath("//button[@class='btn btn-sm btn-block btn-primary']")).click();
I have noticed in your code, that after click on Login in
button, you are not providing any wait
. so due to this reason, you get an error.
I have try the same below code on my end and it is working fine for me.
Try this below code.
driver.get("https://staging.keela.co");
driver.manage().window().maximize();
new WebDriverWait(driver, 15).until(ExpectedConditions.elementToBeClickable(By.linkText("Log In")));
driver.findElement(By.linkText("Log In")).click();
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@id='login-email']")));
driver.findElement(By.xpath("//input[@id='login-email']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//input[@id='login-password']")).sendKeys("keela");
driver.findElement(By.xpath("//button[@class='btn btn-sm btn-block btn-primary']")).click();
Refer Image