Difference in advertised_browser and mobile_browser
Posted: Thu Mar 12, 2015 2:54 pm
So as to find the browserType for any device, I am wondering if I should look at mobile_browser capability or advertised_browser virtual capability. I see inconsistent behavior for same device if the user agent strings are a little different.
Like for Android Chrome for Galaxy Nexus device,
1. For user agent string:
Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19(KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
mobile_browser: Chrome Mobile
advertised_browser: Chrome Mobile
Where as for same device :
2. For the user agent string:
Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19
mobile_browser: Android Webkit
advertised_browser: Chrome Mobile
As you can see, for the 2nd user agent string, the mobile_browser is reported as AndroidWebkit. I was relying on mobile_browser capability for my testing but seems like it's not sufficient. I needed mobile_browser to be reported as "Chrome Mobile" as well. Please let me know which capability is more reliable and what's the recommended way to detect the browser type.
Like for Android Chrome for Galaxy Nexus device,
1. For user agent string:
Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19(KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
mobile_browser: Chrome Mobile
advertised_browser: Chrome Mobile
Where as for same device :
2. For the user agent string:
Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19
mobile_browser: Android Webkit
advertised_browser: Chrome Mobile
As you can see, for the 2nd user agent string, the mobile_browser is reported as AndroidWebkit. I was relying on mobile_browser capability for my testing but seems like it's not sufficient. I needed mobile_browser to be reported as "Chrome Mobile" as well. Please let me know which capability is more reliable and what's the recommended way to detect the browser type.