You have complete control over which classes are assigned to what nodes.
For example if you create an alert box with ExtJS you can always add a no-op classname to it. This way you can write your Selenium test to do class based look ups and then verify the contents of the child nodes within.