title: convert sample java code to ruby - switch webview for hybrid app
body: <p>I am new to use ruby language and having an issue to switch the context to webview. found solution in Java that I need to put in ruby, please could you help understand how this works in Ruby?</p>
  
  <pre><code>Set&lt;String&gt; contextNames = driver.getContextHandles();
          for (String context : contextNames) {
              if (context.contains(contextName)) {
                  driver.context(context);
              }
          }
  </code></pre>