Switching user agents

Earlier, cryptic commands and texts were used to retrieve data from the Internet, which would act as a user agent; now, web browsers are used as user agents. To put it simply, a user agent is a tool to browse the Internet by faking another browser. In general, websites are being rendered differently on different browsers with different platforms (for example, Chrome browser on Windows 7). However, the user agents cannot render a web page similar to the selected one. The user can track their own user agent string from http://whatsmyuseragent.com/.

For example, Mozilla Firefox 5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36.

Here, Mozilla/5.0 is an application name and Chrome/36.0.1985.143 ...

Get Selenium Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.