0

Does implicit wait consider clickability, visiblility or display, or just whether the element exists in the DOM?

I'm trying to click an element in an list (AngularJs ng-repeat directive) but the code throws a StaleElementException.

I have an implicit wait of 30s, and have tried Thread.Sleep, Wait.Until etc, but still have the same issue. If I debug and step through the code, the element is available in the debugger after fetching it via .FindElement(By.CssSelector()), but calling .Click() throws the error.

Thinking it might be caused by the element being added to the DOM, and therefore resolving the implicit wait, but not being visible when calling .Click(). How could I verify that?

Nathan
  • 949
  • 1
  • 20
  • 35
  • Not sure, how you use click. Staleness exception usually appears, when element is not DOM. Maybe you try to click on element, previously founded, stored in variable, but deleted from DOM? Maybe there are new element, which looks same, but it was recreated? – Evgeny Lukoyanov Dec 20 '18 at 08:24
  • Nah, it's definitely in the DOM - I can see it when the test is running. Selector is valid as I can verify it outside the test suite in another instance of the application. – Nathan Dec 20 '18 at 08:29

0 Answers0