title: Selenium::WebDriver::Error::ElementNotVisibleError while looping to click button using Watir
body: <p>I am trying to click a button on loop basis.</p>
  
  <p>Let us say I have following code</p>
  
  <pre><code>if ind == 2
    export_id = @browser.div(:id =&gt; pop_id).div(:class =&gt; /actionDropDownItem groupChild nonSelectable/,:title =&gt; "Export").id
    @browser.div(:id =&gt; export_id).click
  else
    @browser.div(:id =&gt; pop_id).div(:class =&gt; /actionDropDownItem groupChild nonSelectable/,:title =&gt; "Export").click
  end
  </code></pre>
  
  <p>But it shows error at index value "2" and the Error is </p>
  
  <pre><code>Selenium::WebDriver::Error::ElementNotVisibleError:
  Element is not currently visible and so may not be interacted with
  </code></pre>
  
  <p>Can anyone help me in this case?</p>