Getting Browser Details in WebDriver

While not a major requirement getting the browser name and version could come in useful in test reports. Use the following code snippet to get the browser name and version: [code] ICapabilities cap = ((RemoteWebDriver)driver).Capabilities; string strBrowserName = cap.BrowserName; string strBrowserVersion = cap.Version; Console.WriteLine(“Testing on Browser {0} v{1}”, strBrowserName, strBrowserVersion); [/code]

Checking a checkbox with WebDriver

For something as simple as checking a checkbox you would think that all the different browser drivers would implement this in the same way. But sadly this is not the case. Firefox expects that you click on a checkbox to check or uncheck it whereas both the IEDriver and ChromeDriver expect you to type a […]