public static string GetBrowserVersion() { string thisbrowserversion="";
public static string GetBrowserVersion()
{
string thisbrowserversion="";
switch (ThisAppSettings.browserAppSetting.toLower())
{
case "chrome":
thisbrowserversion = ((RemoteWebDriver)thisbrowser).Capabilities.GetCapability("version").ToString();
break;
case "firefox":
thisbrowserversion = ((RemoteWebDriver)thisbrowser).Capabilities.GetCapability("browserVersion").ToString();
break;
default:
// Throw exception stating unsupported browser
}
return thisbrowserversion;
}
}