Azaz khan
Azaz khan

Reputation: 1

Element <input class="button" type="submit" value="Log In"> is not clickable at point (674, 381)

HTML :

<input class="button" type="submit" value="Log In">

Code : This is the code of selenium. WebDriverWait wait = new WebDriverWait(driver, 10); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[@value='Log In']"))); driver.findElement(By.xpath("//input[@value='Log In']")).click();

I have to click this input

Upvotes: 0

Views: 501

Answers (1)

cruisepandey
cruisepandey

Reputation: 29362

Your xpath is wrong

this

input[@value='Log In']

should be

//input[@value='Log In']

Like this

WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[@value='Log In']")));
driver.findElement(By.xpath("//input[@value='Log In']")).click();

//input selects all input elements in a document. Please read about it here

Upvotes: 0

Related Questions