
For the last two years, about 99% of the work I’ve been doing has been JavaScript programming using EXTjs. The problems I’ve encountered along the way are primarily related to testing. Writing unit test using the “MVC Framework” out of the box is nearly impossible, but I did eventually put together an architecture that allows me to do that. I may blog about that in the future.
Today, what I want to offer is how I overcame various hurdles related to testing EXTjs with Selenium. The first problem nearly everyone encounters when they first use EXTjs is that the views that are created are created dynamically. If you use the recommended itemId to uniquely identify the elements on the page, you will be left with IDs that are dynamically generated and inconsistent. That is, just because the ID has one value today doesn’t mean it will have the same value tomorrow. And since the controls are dynamically created based on what browser is running, XPATH queries aren’t a good solution either.


Over the past ten years, I’ve successfully implemented various types of screen scraping in order to provide data to my clients. Most of these implementations have involved accessing HTML and parsing out the data we needed for the web application.
It amazes me how rare the skill of debugging software is. It is even more amazing to me that after programming for over 27 years now, I still have trouble with this. So, as a checklist for myself, and as a possible help to others along the way, I offer you “How to Debug Your Code”


