Get browser version using Selenium WebDriver and Ruby
<p>Trying to extract the browser version without making a system call. Below is my Ruby code. </p>

<pre><code>#!/usr/bin/env ruby

require "selenium-webdriver"

# Tell the Ruby bindings to use Marionette.
# This will not be necessary in the future,
# when Selenium will default to marionette

caps = Selenium::WebDriver::Remote::Capabilities.firefox marionette: true
browser = Selenium::WebDriver.for :firefox, :desired_capabilities =&gt; caps

puts browser.capabilities["version"]
</code></pre>

<p>There is nothing returned to the terminal after execution.</p>