One way to test whether a UI is working is to pay several people to interact with a website via a browser and report any errors they find. This can become a very expensive and, ultimately, unreliable process. Also, it requires putting potentially failing code into production in order to test it. It's better to test whether browser views are rendering correctly from within the testing process itself, prior to releasing anything into the wild.
A browser, stripped of its buttons and other controls, is at heart a program that validates and runs JavaScript, HTML, and CSS, and creates a view. That the validated HTML is rendered visually on your screen is simply a consequence of humans only being able to see with their eyes. A machine can interpret the logic of compiled code and see the results of interactions with that code without...