Future of DOM based UI testing



  • I work with Selenium for quite a while now and was very happy with it for some time. However recently, I get more and more projects where I see extensive use of JavaScript. For example webpages written with ExtJS. As a result, the DOM structure of the webpage becomes unreliable for automation purposes and it gets harder and harder to make it work with Selenium (or any other DOM based automation tool).

    Now, given the fact that the above-mentioned technologies become more and more popular and relatively simple HTML webpages are harder to find, what does that mean in terms of automation tools like Selenium? As far as I see it, if that trend continues, and I see no reason why it wouldn't, will DOM based tools become useless? Are there any other tools that somehow interact better with JS based webpages?

    Will be great to know some thoughts and\or personal experiences on that topic.



  • Eugene S, I had a similar problem with testing UI generated by ExtJS library.

    The solution I found useful was to create separate classes for more complex visual components. For instance, for data grid components I have created ExtJsDataGrid class that let me pick up a specific cell in the grid, abstracting me from obscure details in Selenium (dynamic locators, JavaScript invocations, etc.).

    There are even companies that develop libraries of such wrappers, backed with Selenium, e.g. InfoStretch did it for ExtJs. It would be great, though, if each company that release a new library for UI rendering to provide also a library in Selenium to test their components. ExtJs would provide library for testing ExtJs components, Angular for Angular stuff, etc.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2