Codify huge swathes of it, though? Absolutely. Assert that correct fonts and font sizes are used. Assert that color schemes are correctly followed, or that certain widgets always have attached desirable behaviors, assert that all widgets have keyboard shortcuts, assert that those keyboard shortcuts are coherent (CTRL-F is not assigned to three actions), assert that using the keyboard shortcut has the same behavior as whatever it is the shortcut to, assert that automated validation of appropriate accessibility guidelines hold (ie, for web interfaces assert that a Bobby run over your interface holds no surprises), and so on.
Sure, you can't "automate usability" but if you just give up at that point you'll miss out on a lot of things you can automate... or could automate if GUIs let you, getting back to my original point.