0

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

2
  • What's the context around "tried for 10 seconds with 500 milliseconds interval"? I'd move this bit of the text from the title and clarify it with additional info in the question. Commented Oct 1, 2021 at 18:11
  • Please provide enough code so others can better understand or reproduce the problem. Commented Oct 9, 2021 at 0:44

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

2 Comments

Element <input class="button" type="submit" value="Log In"> is not clickable at point (674, 381). Other element would receive the click: <div class="spinner">...</div> @cruisepandey
That's a different issue, not the one you've mentioned in your original question, Please try to submit a new ticket for new issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.