Getting OS info and Firefox browser version in Selenium 3 Getting OS info and Firefox browser version in Selenium 3 selenium selenium

Getting OS info and Firefox browser version in Selenium 3


I figured this out:

    Capabilities cap = ((RemoteWebDriver) driver).getCapabilities();    String browserName = cap.getBrowserName();    String browserVersion = (String)cap.getCapability("browserVersion");    String osName = Platform.fromString((String)cap.getCapability("platformName")).name().toLowerCase();    return browserName + browserVersion + "-" + osName;

Maybe it's the case that the names of the platform and browser version keys for the capabilities map changed and broke this functionality. In any case, I can now correctly retrieve the plaform and browser version.