Showing posts with label get os using selenium. Show all posts
Showing posts with label get os using selenium. Show all posts

Friday, May 20, 2011

Selenium commands to get browser name, browser version , operating system and few more

Browser name : selenium.getEval("navigator.appName;") returns the name of the browser.

Browser code name : selenium.getEval("navigator.appCodeName;") returns the code name of the browser.

Browser version : selenium.getEval("navigator.appVersion;") - The appVersion property is supported in all major browsers and it returns the version of the browser.

Browser and Operating system : selenium.getEval("navigator.userAgent;") - This property returns the value of the user-agent header sent by the browser to the server.

Whether Java Enabled : selenium.getEval("navigator.javaEnabled();") - returns a Boolean value that specifies whether the browser has Java enabled.

selenium.getEval("navigator.platform();") - returns for which platform the browser is compiled

Check Cookie Enabled or not : selenium.getEval("navigator.cookieEnabled();") - returns a Boolean value that specifies whether cookies are enabled in the browser.