Eye on Browser

We use browser million times a day…But have we ever looked at browser through an automation geek’s thick glasses?

1. What components does a browser have?
Web browsers consist of a user interface, layout engine, rendering engine, JavaScript interpreter, UI backend, networking component and data persistence component. These components achieve different functionalities of a web browser and together provide all capabilities of a web browser

2. What can a browser do for us other than displaying the web page?
It certainly has a very good memory. It remembers so many things about us: our bookmarks, passwords, settings, plug-ins. Where are these info stored? In something called User profile.

3. Browser can be extended with plug-ins
We can add more functionality to our browser by installing 3rd-party plug-ins. A peek of plug-ins on my chrome now:postman, acrobat, flash player, ad-block….

4. Browser’s capabilities can be customized
With our browser, we can go to its Settings to tweak the browser capabilities like:
enable/disable javaScript
enable/disable cookie
specify home pages upon lauching

We can customize our browser to behave differently.

What kind of browser shall our application run in? in a clean browser? in an incognito (aks private) window? in a browser with an certain user profile? Or in a browser with some specific settings and plug-ins?

A: It doesn’t hurt for us to run automation against a clean browser as a start. This will make it easy for us to narrow-down bug causes when we run into it.

But in reality, all real world users are using our application in a “dirty” browser. Our application might behave differently or even buggish-ly(illegal English, I know), and in this case, our automation shall launch a similar dirty browser and run our scripts against it.