title: A way around Element cannot be scrolled into view - Watir-webdriver with Ruby
body: <p>So, we have the following code in our page:</p>
  
  <pre><code>&lt;div class="toggle-wrapper"&gt;
    &lt;input id="HasRegistration_true" class="registration_required toggle" type="radio" value="True" name="HasRegistration" data-val-required="The HasRegistration field is required." data-val="true"&gt;
    &lt;label for="HasRegistration_true" class=""&gt;On&lt;/label&gt;
    &lt;input id="HasRegistration_false" class="registration_required toggle" type="radio" value="False" name="HasRegistration" checked="checked"&gt;
    &lt;label class="checked" for="HasRegistration_false"&gt;Off&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>These are 2 radio buttons. 'On' and 'Off'. 'Off' is the default value.</p>
  
  <p>Using Watir-webdriver and Ruby, we want to select the 'On' radio button. We do so like this:</p>
  
  <pre><code>browser.radio(:id =&gt; "HasRegistration_true").set
  </code></pre>
  
  <p>But in doing so, we get the following error:</p>
  
  <pre><code>`WebElement.clickElement': Element cannot be scrolled into view:[object HTMLInputElement] (Selenium::WebDriver::Error::MoveTargetOutOfBoundsError)
  </code></pre>
  
  <p>We know Selenium 2 scrolls the page to the element, so trying to scroll down is useless.
  We are always using the latest releases of watir-webdriver and ruby.</p>
  
  <p>We can't change the HTML of the page since we're QA engineers.</p>