User agent simulation for mobile

To overcome the problem of user agent sniffing, new browsers were designed to allow for spoofing or simulation of the user agent as a means of bypassing discriminatory server rules. This capability has since then persisted and all modern browsers today have the feature of user agent string simulation as an inbuilt capability. So, using this feature to our advantage, we can simulate the user agent of a mobile device while accessing any mobile web application through any browser. On sniffing the user agent, the server would take the request to be originating from a mobile device and hence would respond with the mobile view. Thus, we would be able to get the mobile web application interface from a desktop browser. ...

Get Mastering Mobile Test Automation 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.