Testing ext.js Application

Google search by “Selenium testing ext js app” showed me the following read. This article would be useful for you and your Ext.js app developers.

Locating elements in web applications created by Ext JS framework could be a total nightmare for UI automators, as Ext JS generates one of the most complex DOM structures which have dynamic IDs with a large amount of duplicate class names.

Unlike automating applications with simple DOM structures, Selenium WebDriver’s built-in methods like By.Id, By.ClassName, By.Name would barely identify anything in Ext JS applications. In most of the cases, By.CssSelector or By.XPathwill be neccessary, even though using them are not that straightforward either.

Hopefully this article would help developers write the most concise meaningful and human readable locators, so that maintenance cost can be kept minimum when automating ExtJS applications.

I was impressed with the following sentence at the end of this article, in the Ultimate Solution section:

Web designers can add class names to HTML in order to make styling easier. Developers should add class names to HTML for UI testing purposes too!

This would be a practical way for developers and testers to compromise and cooperate well.