I have SPA application on on stack ASP MVC + AngularJS and i'd like to test UI. For a now i'm trying for Selenium with PhantomJS and WebKit drivers.
Testing page - view with single element - the list of <li>
which loads dynamically from server and bind by Angular.
<div id="items">
<li>text</li>
<li>text2</li>
</div>
I'm trying to pass test
_driver.FindElements(By.TagName('li'))
The problem is that at this moment there is no elements loaded, and _driver.PageSource doesn't contain elements too.
How can i wait for items loaded? Please do not suggest Thread.Sleep()