Updated for a talk at StirTrek 2013: Now includes a few extra slides on asynchronous stuff like AJAX. You can also find demo code at http://github.com/jimholmes/SE13
This deck is from my Speaker Idol talk at TechEd 2012. The talk is mean to highlight the importance of choosing good locators when creating automated tests around your UI. (I took second in the competition.)