'Problem locating element with xpath in Selenium

I am having some troubles to locate an element with Selenium. The page html where I'm looking for it is:

enter image description here

Specifically, I want to get the input with id='filtroDNI'. For this I'm using

WaitFluent.xpathClickable("//input[@id='filtroDNI']")

But I'm getting Method threw 'org.openqa.selenium.TimeoutException' exception. because Expected condition failed: waiting for visibility of element located by By.xpath: //input[@id='filtroDNI'] (tried for 11 second(s) with 3000 milliseconds interval)

However, If I try to get some elements above this one, I can reach the div with id='content-wrap' by using following code:

WaitFluent.xpathClickable("//div[@id='content-wrap']")

Do you have any idea of what can be happening? Also I tried with alternative xpaths but the results are the same.

Also, the page is throwing an error but after consulting it with the dev team, they said it has nothing to be with my question, the error is this one:

Uncaught TypeError: Cannot read properties of undefined (reading 'hasChildNodes')
    at sorter.sort (script.js:53:12)
    at sorter.reset (script.js:43:9)
    at sorter.init (script.js:37:8)
    at new sorter (script.js:8:77)
    at histo.php:277:54

Thanks in advance

Edit: xpathClickable method code:

/**
     * <STRONG>Description:</STRONG>Waits for an element with a given xpath to be clickable.
     *
     * @param xpath String;
     * @return WebElement
     */
    public static WebElement xpathClickable(final String xpath) {
        return new FluentWait<WebDriver>(myEnvironment)
                .withTimeout(IMPLICIT_TIMEOUT)
                .pollingEvery(RETRY_TIME)
                .ignoring(StaleElementReferenceException.class,
                        NoSuchElementException.class)
                .until(ExpectedConditions
                        .elementToBeClickable(By.xpath(xpath)));
    }

Edit 2: DEV team already solved the JS issue shown in console, but the xpath cannot be retrieved yet.



Sources

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

Source: Stack Overflow

Solution Source