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

Azaz khan
  • 1
  • 1
  • 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. – i336_ Oct 01 '21 at 18:11
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 09 '21 at 00:44

1 Answers1

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

cruisepandey
  • 28,520
  • 6
  • 20
  • 38
  • Element is not clickable at point (674, 381). Other element would receive the click:
    ...
    @cruisepandey
    – Azaz khan Oct 01 '21 at 13:07
  • 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. – cruisepandey Oct 01 '21 at 13:09