Automated testing EmberJS applications
Has anyone had any experience with automated testing web apps in EmberJS and HTML5? I'm currently trying to write scripts using IntelliJ atop webdriver however it's proving difficult to identify elements in the DOM. Just looking for feedback on what works and what may not if anyone has had any experience?
Sure. There's tons of things to watch out for, this applies to single page apps that support data binding in general. Ask questions and I'll try to clarify.
Some general things to keep in mind.
* When data gets updated, the entire element is removed from the dom and recreated (in most cases), so you tend to have to relocate elements often.
* For locating elements, it's best to just add CSS or unused html attributes to use as locators. Using index and path tends not to be reliable because there tends to be a lot of invisible elements you don't see. This is especially true in older versions of ember where they have meta morph tags that serve as place holders for data bound elements.
* You cannot rely on page load as a clear state transition. You almost always have to do a wait for element after any route change. This is because the page is not actually loading, it's tearing down its elements and loading new ones.
Hope that helps