0

i was doing some test and when i run a test with a searcher that i already work for and this error appear

System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> OpenQA.Selenium.ElementNotInteractableException : element not interactable

then i tried to run a test that i knew that worked and when it was time to use the searcher, the same error appear, it's kinda weird because i don't see any diference in the HTML code, and the searcher does work if i enter to the page manually.

this is my code to manipulate the searcher:

[FindsBy(How = How.CssSelector, Using = "input")]
private IWebElement buscadorConfig;

public ConfigurationUsuario buscarTabla(string input_search)
{
       buscadorConfig.SendKeys(input_search);
       return new ConfigurationUsuario(driver);
}

Here is an example of any test that use it:

        usuario.clickConfiguration();
        System.Threading.Thread.Sleep(2000);
        
        configuracion.buscarTabla("041097");
        System.Threading.Thread.Sleep(2000);

And this is the HTML code for the searcher:

<div id="table_filter" class="dataTables_filter">
<label>Search:<input type="search" class="" placeholder="" aria-controls="table"></label>
</div>

To be honest i don't know why all of a sudden the searcher stop working in my test script, i have like 10 test that use it and know none of them works, i literally change anything , i don't know if the devs did but i hope you guys can help me.

1 Answer 1

1

You can use a more canonical Locator Strategy as follows:

[FindsBy(How = How.CssSelector, Using = "input[aria-controls='table'][type='search']")]
private IWebElement buscadorConfig;
Sign up to request clarification or add additional context in comments.

Comments

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.