'Element not interactable with Selenium Excel VBA when using SendKeys

I am trying to login to a site and I am using FindElementById. In the following code the first part of using SendKeys works well but when trying to use the same technique for the password field, I get an error message which tells me that the element is not interactable

Sub Test()
Dim bot As New WebDriver

With bot
    .AddArgument "--disable-notifications"
    .Start "Chrome", "https://www.excelforum.com/excel-programming-vba-macros/"
    .Get "/"
    
    .FindElementById("navbar_username").SendKeys "username"
    .FindElementById("navbar_password").SendKeys "password"
    '.FindElementByName("vb_login_password").SendKeys "password"
    Stop
End With
End Sub


Solution 1:[1]

Try referring this webpage

The page you are trying to access has added a web element over another web element. i.e web element of id navbar_password_hint over web element of id navbar_password. Try referring above link to solve your problem.

Solution 2:[2]

This happens when the element state is not clickable. You have to use webdriver wait property and make sure that element state is clickable

 WebDriverWait wait= new WebDriverWait(driver, 10);
    WebElement e= wait.until(ExpectedConditions.elementToBeClickable(By.xpath("xpath_of_element")));
    e.click();

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Whizdom Trainings