title: Cucumber/Capybara/Selenium - Setting the cookies
body: <p>For my test case, I tried setting the cookies with following ways, But it is not getting set</p>
  
  <pre><code>1)browser = Capybara.current_session.driver.browser
    browser.manage.add_cookie :name =&gt; "xxx", :value =&gt; "cookie"
  
  2)driver = Capybara.current_session.driver
    br = driver.browser.send(:bridge)
    br.addCookie({
      'name'    =&gt; "xxx",
      'domain'  =&gt; "localhost",
      'value'   =&gt; "cookie",
      'path'    =&gt; '/',
      'expires' =&gt; (Time.now + 100.years).to_i
    })
  </code></pre>
  
  <p>Let me know if i miss anything or i have to do it in other way</p>