
This probably doesn’t happen all that often, but this last week I came across the need to know which browser I was running my selenium test against. I figured that buried deep in the object structure of Selenium, there MUST be a way of finding out what browser I was currently running. As it turns out, I was right. The situation that caused this requirement is that the place where I’m currently writing most of my code is upgrading all the Firefox browsers. I was asked to make sure the code we were running still works with the new browser. When I did, I found that some of my tests broke even though the test itself still succeeds when it is run manually. In fact, they only broke when running against this new version of Firefox.
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”




