I have a C# Sharp application where we’ve upgraded the Browser from version 101 to 125. There is an Selenium Test Solution where all the tests pass but now fail.
These failing tests are erroring on locating and element by CSS Selector and giving the message unable to locate element. Looking through one of the tests in debug the test starts running, does some processing on the page, the page refreshes and is meant to carry on, but doesn’t. The code we have is
var element= new WebDriverWait(this.driver, 10);
element.Until(e=>e.FindElement(By.CssSelector(selec)));
Now, I have tried modifying by using expected conditions with an xpath by id to the element but still getting the same error message.
Does anyone know how to solve this?