Hi, you can click on below link you will get complete script for "How to get Browsername , version and Os details ? http://techlearn.in/content/how-get-system-os-browser-name-and-version-using-java-and-selenium-webdriver".http://techlearn.in/content/how-get-system-os-browser-name-and-version-using-java-and-selenium-webdriver
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ecccadd7-20a6-45b7-894d-ac8f556c5272%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABnqZoQ0_ONqxETKXeEEW-fGz3MhUSDeJF1wSvAuipvT5J0HOQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLk2-Oqd%3DfC9cGOAOPoXLqH2umMfL%3DZAypZiJnnsVjV51A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CACuB3fbJ-Nv8PBEML6C5_%2B0Jf9oxZUKF_SBXo99R3S%2BKUn-NjA%40mail.gmail.com.
Oscar,Here's a typical scenario wherein this would be useful for sure.Lets say your capabilities read as just "Firefox on MAC" and lets say you are leveraging a cloud execution environment such as SauceLabs. In those cases your test is going to be routed to a firefox browser on MAC but what version of MAC and what version of Firefox it was executed against is something that you wouldn't know.
Another use case is when you have a bunch of windows nodes each of which is perhaps running a different version of firefox version in your in house grid and you would like to know which browser version it was executed against.
So there are use cases wherein this is a need of the hour.
Chrome browser is another use case [ it keeps auto upgrading itself and the mechanism of turning off the auto upgrade doesnt seem to be an easy thing ] so it would be good to find out what is the browser version in this case as well.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnbYWAovVwgaKS%3D-ex0Zi-s-24vYBH91GmUYk2Bhxsd%3DQ%40mail.gmail.com.
browser.getCapabilities().then(function(c) {
console.log(c);
console.log(c.get('browserName'));
});
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d0995548-e72c-43eb-af27-596b3d114b72%40googlegroups.com.
Now that you have the user agent string, you might want to use a library such as this : https://github.com/ua-parser/uap-csharp
To parse the user agent and extract values out of it.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9699e111-9169-429c-8d26-8328cafefbea%40googlegroups.com.
The user agent you shared is not firefox. It is IE
Open up the URL : https://developers.whatismybrowser.com/useragents/parse/
And paste the user agent:
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko
And parse it to see the results for yourself.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3a0e1cc2-cfb2-4e88-876f-792766afe84a%40googlegroups.com.